This is a simple end-to-end machine learning project that predicts the risk of heart disease using basic classification models. The project demonstrates the full workflow from data preprocessing and model training to deployment as a REST API with basic explainability.
The goal of this project is to build a machine learning model that can classify whether a person is likely to have heart disease based on clinical features. The trained model is exposed through a Flask-based API for real-time predictions, and SHAP is used to provide feature importance for model interpretability.
- Python
- scikit-learn
- Flask
- SHAP
- Pandas
- NumPy
- Data preprocessing and feature engineering
- Training of simple classification models
- Model evaluation using standard metrics
- REST API for real-time inference
- Explainable predictions using SHAP
- Install the required packages:
pip install -r requirements.txt
- Train the model: python train.py
- Start the Flask server: python app.py
- Send input features as a POST request to get predictions.