View on GitHub

ML_heart_disease

python3 program that analyzes trends between various risk factors and uses ML models to predict heart disease

Data analysis and Machine Learning models to predict heart disease

A python3 program which used data analysis techniques to observe trends between various risk factors for heart diseases. Then, machine leaning models were created to predict whether a person has heart disease based on those risk factors. See my findings here!

Setup

Installation

  1. Install Python 3.7 or above.
  2. Install these modules:
    • NumPy
    • pandas
    • matplotlib
    • seaborn
    • scikit-learn

Running the program

  1. Download the cleveland.csv file and heart_disease.py files.
  2. Place them inside the same folder.
  3. Open the aforementioned folder in your terminal (for MacOS and Linux) or command prompt (for Windows).
  4. Type python heart_disease.py and press enter to run the program.

OR

  1. Install any IDE.
  2. Create a new project, copy the heart_disease.py code and paste it in a .py file.
  3. Run the program.

Models used:

  1. Logistic Regression
  2. Support Vector Machine (SVM)
  3. Gaussian Naive Bayes
  4. Decision Trees

Contributing

Pull requests are welcome for adding more ML models or fixing exisiting issues.

License

MIT