Predicting Heart Disease with ML 🏥🤖 Machine learning model to predict heart disease using clinical data. Includes data analysis, feature engineering, and model training.
MIT License
This notebook looks into using various Python-based machine learning and data science libraries in an attempt to build a machine-learning model capable of predicting whether someone has heart disease based on their medical information.
Built with:
We are going to take the following approach:
Given clinical parameters about a patient, can we predict whether they have heart disease?
If we can reach 95% accuracy at predicting whether a patient has heart disease during the proof of concept.
Heart Disease Data Dictionary
The following are the features we'll use to predict our target variable (heart disease or no heart disease).
Clone the repository:
git clone https://github.com/AdrianTomin/heart-disease-prediction.git
cd heart-disease-prediction
Create and activate the Conda environment:
conda env create -f environment.yml
conda activate heart-disease-classification
Clone the repository:
git clone https://github.com/AdrianTomin/heart-disease-prediction.git
cd heart-disease-prediction
Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install the dependencies:
pip install -r requirements.txt
Choose one of these options to set up the environment, depending on your preference. `
Install Jupyter Notebook or JupyterLab:
conda install -c conda-forge notebook
# or for JupyterLab
conda install -c conda-forge jupyterlab
Start Jupyter Notebook or JupyterLab:
jupyter notebook
# or for JupyterLab
jupyter lab
Navigate to the project directory:
cd heart-disease-prediction
Start the Jupyter Notebook server:
jupyter notebook
Open the notebook:
In the Jupyter Notebook interface, open the heart_disease_prediction.ipynb
notebook.
Run the notebook cells:
Execute the cells in the notebook to train the model and make predictions. Ensure you have downloaded the dataset and placed it in the appropriate directory as mentioned in the notebook.
This README provides a comprehensive guide for setting up the environment, installing dependencies, and running the notebook.