This project is a machine learning-powered web app that predicts the likelihood of heart disease based on user-provided health parameters.
It uses a Logistic Regression model trained on cardiovascular data, selected after evaluating multiple supervised classification algorithms.
- User-friendly Streamlit web interface
- Accepts health parameters like age, cholesterol, blood pressure, heart rate, etc.
- Uses the same preprocessing pipeline from training (scaler + expected columns)
- Real-time prediction with a clear High Risk / Low Risk output message
We tested the following supervised classification algorithms:
- Logistic Regression ✅ (best performer)
- K-Nearest Neighbors (KNN)
- Support Vector Machine (SVM)
- Decision Tree
- Naive Bayes
Logistic Regression was chosen based on the best performance in terms of accuracy and f1_score.
git clone https://github.com/Ariz253/HeartWise.git
cd HeartWisepython -m venv venv
# On Mac/Linux
source venv/bin/activate
# On Windows
venv\Scripts\activatepip install -r requirements.txtThe following files should be in the project root:
heart_disease_model.pkl→ trained Logistic Regression modelheart_disease_scaler.pkl→ scaler object used in preprocessingheart_disease_columns.pkl→ expected column names for input data
streamlit run app.py