AI/ML Heart Disease Prediction API
An end-to-end ML pipeline that turns patient clinical data into a served, callable risk prediction.

Why AI/ML Heart Disease Prediction API?
Heart disease is one of the leading causes of death worldwide. Early identification of high-risk patients can support better screening and preventive care.
What it does
The API ingests standard patient clinical data, runs it through trained classification models, and returns a probability score plus a predicted risk category.
It powers the CardioPredictor frontend, but is built as a standalone, documented service any client can consume.


How I built it
A reproducible pipeline covers data preparation, model training and evaluation, and serving — with FastAPI exposing the trained model as a REST API.
- Language
- Python
- Modeling
- scikit-learn classification models
- Serving
- FastAPI
Challenges I ran into
- Handling class imbalance in the training data without inflating apparent accuracy.
- Benchmarking and tuning across multiple classification models to pick the best performer.
- Building a clean, reproducible pipeline from raw data all the way to served predictions.
- Keeping inference fast enough to feel real-time to the frontend.
Accomplishments I am proud of
Full end-to-end pipeline
Covers data prep, training, evaluation, and serving as one reproducible flow.
Benchmarked model selection
Multiple classification models were compared to choose the strongest performer for this dataset.
Documented, reusable API
Clean FastAPI endpoints that any frontend — not just CardioPredictor — can consume.
What I learned
- How much pipeline reproducibility matters once a model needs to move from notebook to production.
- The tradeoffs between model interpretability and raw accuracy in a healthcare context.
What's next
- Add model monitoring and drift detection.
- Expand the feature set with additional clinical signals.
- Set up CI for automated retraining.