This project predicts the likelihood of heart disease based on patient medical information using Machine Learning techniques.
The application performs data preprocessing, feature scaling, model comparison, and prediction through an interactive Streamlit web application.
The final model was trained using Logistic Regression and deployed using Streamlit.
https://heart-disease-risk-predictorgit-gh7rwybjhsrcodifjeysru.streamlit.app/
- Data Cleaning and Preprocessing
- Exploratory Data Analysis (EDA)
- Feature Engineering
- One-Hot Encoding
- Feature Scaling using StandardScaler
- Multiple ML Model Comparison
- Heart Disease Risk Prediction
- Interactive Streamlit Web Application
- Probability-Based Risk Score
- Python
- Pandas
- NumPy
- Matplotlib
- Seaborn
- Scikit-Learn
- Joblib
- Streamlit
- Logistic Regression
- K-Nearest Neighbors (KNN)
- Naive Bayes
- Decision Tree Classifier
- Support Vector Machine (SVM)
After evaluation, Logistic Regression achieved the best performance and was selected as the final model.
Heart_Disease_Prediction/
│
├── app.py
├── heart_risk_pred.ipynb
├── Logistic_Regression_heart.pkl
├── heart_scaler.pkl
├── heart_columns.pkl
└── README.md
Clone the repository:
git clone https://github.com/your-username/heart-disease-risk-prediction.gitMove into the project directory:
cd heart-disease-risk-predictionInstall dependencies:
pip install -r requirements.txtRun the application:
python -m streamlit run app.pyThe model uses the following patient attributes:
- Age
- Sex
- Chest Pain Type
- Resting Blood Pressure
- Cholesterol
- Fasting Blood Sugar
- Resting ECG
- Maximum Heart Rate
- Exercise-Induced Angina
- Oldpeak
- ST Slope
The application predicts:
- Low Risk of Heart Disease ✅
- High Risk of Heart Disease
⚠️
It also provides a probability-based risk score for better interpretation.
- Data Collection
- Data Cleaning
- Exploratory Data Analysis
- Feature Engineering
- Data Encoding
- Feature Scaling
- Model Training
- Model Evaluation
- Model Selection
- Streamlit Deployment
This project is developed for educational and learning purposes only.
The predictions generated by this model should not be considered professional medical advice. Always consult qualified healthcare professionals for medical diagnosis and treatment.
Yashasvi Tomar
B.Tech Electronics Engineering Machine Learning Enthusiast