Heart disease prediction model made with sci-kit learn.
Setup your virtual environment and run the following command:
python app.py
{
"features":[[57,0,0,140,241,0,1,123,1,0.2,1,0,3]]
}
Once the app is up and running the hit this endpoint with above payload: http://localhost:5000/predict
The following are the features we'll use to predict our target variable (heart disease or no heart disease)
-
age - age in years,
-
sex - (1 = male; 0 = female),
-
cp - chest pain type,
- 0: Typical angina: chest pain related decrease blood supply to the heart
- 1: Atypical angina: chest pain not related to heart
- 2: Non-anginal pain: typically esophageal spasms (non heart related)
- 3: Asymptomatic: chest pain not showing signs of disease
-
trestbps - resting blood pressure (in mm Hg on admission to the hospital) anything above 130-140 is typically cause for concern
-
chol - serum cholesterol in mg/dl
serum = LDL + HDL + .2 * triglycerides,
above 200 is cause for concern, -
fbs - (fasting blood sugar > 120 mg/dl) (1 = true; 0 = false)",
'>126' mg/dL signals diabetes, -
restecg - resting electrocardiographic results,
- 0: Nothing to note,
- 1: ST-T Wave abnormality
- 2: Possible or definite left ventricular hypertrophy, Enlarged heart's main pumping
-
thalach - maximum heart rate achieved,
9. exang - exercise induced angina (1 = yes; 0 = no),
10. oldpeak - ST depression induced by exercise relative to rest, in rangr 0.0 to 4.0
- looks at stress of heart during excercise,
- unhealthy heart will stress more,
- 0: Upsloping: better heart rate with excercise (uncommon),
- 1: Flatsloping: minimal change (typical healthy heart),
- 2: Downslopins: signs of unhealthy heart,
- colored vessel means the doctor can see the blood passing through,
- the more blood movement the better (no clots),
- 1,3: normal,
- 6: fixed defect: used to be defect but ok now,
- 7: reversable defect: no proper blood movement when excercising,
Note: No personal identifiable information (PPI) can be found in the dataset