Skip to content

atharvaaswale/stroke-prediction

Repository files navigation

Stroke Risk Prediction System

An end-to-end Machine Learning solution designed to identify high-risk stroke patients using clinical and lifestyle data. This project features an XGBoost pipeline and a real-time interactive dashboard.


🚀 Live Web Application

App Screenshot

*Interactive dashboard built for real-time risk assessment.*

🛠️ Key Technical Features

  • Predictive Engine: Optimized XGBoost Classifier utilizing hyperparameter tuning via RandomizedSearchCV.
  • Imbalance Handling: Addressed heavy class imbalance using scale_pos_weight, prioritizing Recall (57%) to minimize dangerous False Negatives in a medical context.
  • Data Integrity: Identified and removed 'Stroke Risk Score' to prevent data leakage, ensuring the model relies purely on objective markers (BMI, Glucose, Medical History).
  • Deployment Pipeline: Integrated StandardScaler for feature normalization and Joblib for model serialisation.
  • Interoperability: Exported model to ONNX format to support future Native Mobile app integration.

📊 Tech Stack

  • Language: Python
  • ML Libraries: Scikit-learn, XGBoost, Pandas, NumPy
  • Deployment: Streamlit
  • Serialization: Joblib, ONNX

📖 How to Run

  1. Clone the repository:
    git clone [https://github.com/yourusername/stroke-prediction.git](https://github.com/yourusername/stroke-prediction.git)
  2. Install dependencies:
    pip install streamlit pandas joblib xgboost scikit-learn
  3. Launch the dashboard:
    streamlit run app.py

🎯 Focus & Objectives

The primary objective of this system is to serve as a high-sensitivity screening tool. By prioritizing Recall over global accuracy, the model is optimized to minimize False Negatives, ensuring that potential high-risk cases are flagged for clinical consultation. This approach shifts the focus from simple classification to a risk-mitigation strategy suitable for medical contexts.

About

Stroke Risk Prediction system featuring an optimized XGBoost pipeline and a real-time Streamlit dashboard. The model focuses on clinical reliability by prioritizing Recall (57%) and removing subjective data leakage to ensure predictions are based purely on objective medical markers like BMI, Glucose, and patient history.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors