/Project1-Heart-Data

Make prediction on patient have heart disease or not. Binary classification problem

Primary LanguagePython

Project1-Heart Data

Heart Disease Prediction Make prediction on patient have heart disease or not. Do the Data Analysis - Descriptive statistics link: https://www.kaggle.com/code/ishanjat/heart-disease-prediction/data

1. Summary

  • To make prediction on the patient have the heart disease or not
  • Do the data analysis
  • the deep learning model is used and trained
  • The model is self-made.

2. IDE and Framework

  • The project built with Spyder as the main IDE
  • use Tensorflow, Keras, Numpy, Mathplot

3. Methodology

  • The dataset was obtained in form of csv containing the 1024 smaples with 14 features.
  • perform data cleaning to see the null data is available or not. In this project there is no null data. we move on to another step.
  • Do the data analysis; correlation between the pair of feature
  • Perform data preprocessing where we spilt data into feature(inputs) and label (output). The output is in the form of 1 or 0, to show that this project is binary classification problem
  • the model constist of 5 dense layers.

4.Result

  • Correlation:

image

  • histogram of age

image

  • histogram of target ( 1 or 0)

image

  • histogram of sex

image

  • density plot of age

image

  • density plot of thalach

image

  • density plot of chol

image

  • boxplot of data

image

Model

use train test split

  • Model summary:

image

-The model is compile with optimizer of 'adam' with learning rate = 0.001, loss= BinaryCrossentropy', metrics of accuracy, batch_size of 32 and epochs of 200

  • The value is display by using TensorBoard:

image

image

Model Evaluate

image

the top is for training and the bottom for test

  • we can see that the model has 100% accuracy and almost 0 loss. The model is good and no need modifictaions

Model test

  • make predictions
  • make prediction on the first 5 test data

image