Skip to content

This project delivers a machine learning-powered API to predict the risk of heart disease from clinical patient data. It uses a trained classification model to analyze key health metrics and outputs a prediction along with the confidence probability.

Notifications You must be signed in to change notification settings

EgonLh/Heart-Disease-Prediction-API

Repository files navigation

Heart Disease Prediction API

This project serves a machine learning model that predicts the likelihood of heart disease based on patient clinical data. It leverages a trained classifier, exposes a REST API with FastAPI, and logs prediction data for monitoring and versioning.


Features

  • Baseline ML model trained on the Heart Disease dataset.
  • Prediction API built with FastAPI for serving model predictions.
  • Input validation using Pydantic schemas.
  • Prediction logging with timestamps, saved as CSV for audit and analysis.


├── app.py                 # FastAPI application serving the model
├── models/
│   └── model.pkl          # Trained model artifact
├── data/
│   └── raw_data.csv       # Original dataset
├── logs/
│   └── predictions_log.csv # Logs of predictions with timestamps
├── preprocess.py          # Data preprocessing script
├── train.py               # Model training script
├── evaluate.py            # Model evaluation script
├── requirements.txt       # Python dependencies
├── Dockerfile             # Container setup (planned)
├── dvc.yaml               # Pipeline configuration (planned)
└── README.md

This project is actively maintained with plans to improve: Integration of DVC pipelines for reproducible training and version control. Containerization with Docker for easier deployment. Monitoring and alerting setup using Prometheus and Grafana dashboards. Exploration of CI/CD automation using GitHub Actions. Model improvements with additional data and calibration to reduce false positives. Let me know if you want it more casual, or want to add badges, GIFs, or anything else!

About

This project delivers a machine learning-powered API to predict the risk of heart disease from clinical patient data. It uses a trained classification model to analyze key health metrics and outputs a prediction along with the confidence probability.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages