0% found this document useful (0 votes)
43 views5 pages

Heart Disease Prediction System

This document describes a heart disease prediction system that uses 14 attributes to predict whether a patient has heart disease. The attributes include age, sex, chest pain type, blood pressure, cholesterol, fasting blood sugar, electrocardiographic results, heart rate, exercise angina, ST depression, slope of peak exercise segment, number of major vessels colored by fluoroscopy, thalassemia, and diagnosis of heart disease. The system takes patient attribute data and outputs whether there is less than 50% or greater than 50% diameter narrowing in major vessels, indicating the presence or absence of heart disease.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views5 pages

Heart Disease Prediction System

This document describes a heart disease prediction system that uses 14 attributes to predict whether a patient has heart disease. The attributes include age, sex, chest pain type, blood pressure, cholesterol, fasting blood sugar, electrocardiographic results, heart rate, exercise angina, ST depression, slope of peak exercise segment, number of major vessels colored by fluoroscopy, thalassemia, and diagnosis of heart disease. The system takes patient attribute data and outputs whether there is less than 50% or greater than 50% diameter narrowing in major vessels, indicating the presence or absence of heart disease.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Heart-disease-prediction-system

Description:

Here 4 stages , diseased or not and also 2 stages

1st row - age

2 row - male or female (1 - male)

3 - chest pain CP

cp: chest pain type

-- Value 1: typical angina(Chest portion)

-- Value 2: atypical angina

-- Value 3: non-anginal pain

-- Value 4: asymptomatic

4 - trestbps: resting blood pressure (in mm Hg on admission to the

hospital)

5 - chol: serum cholestoral in mg/dl

6 - fbs: (fasting blood sugar > 120 mg/dl) (1 = true; 0 = false)

7 - restecg: resting electrocardiographic results

-- Value 0: normal

-- Value 1: having ST-T wave abnormality (T wave inversions and/or ST


elevation or depression of > 0.05 mV)

-- Value 2: showing probable or definite left ventricular hypertrophy

by Estes' criteria

8 - thalach: maximum heart rate achieved

9 - exang: exercise induced angina (1 = yes; 0 = no)

10 - oldpeak = ST depression induced by exercise relative to rest

11 - slope: the slope of the peak exercise ST segment

-- Value 1: upsloping

-- Value 2: flat

-- Value 3: downsloping

12 - ca: number of major vessels (0-3) colored by flourosopy

13 - thal: 3 = normal; 6 = fixed defect; 7 = reversable defect

14 - num: diagnosis of heart disease (angiographic disease status)

-- Value 0: < 50% diameter narrowing

-- Value 1: > 50% diameter narrowing

(in any major vessel: attributes 59 through 68 are vessels)

Program:
from numpy import *

# remember row in excel is column in real life

# Just change the row name to find whether in a particular row has empty elements or not . Eg
row[11]

import csv

inp = open('D:\Python\Heart Disease\original.csv','r')

out = open('D:\Python\Heart Disease\original1.csv','w')

writer = csv.writer(out)

for row in csv.reader(inp):

if(row[11] >= "0" and row[12] >= "0"):

writer.writerow(row)

print(out)

inp.close()

out.close()
Data:

Graph:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy