Predict Stroke Risk
Before It Happens
Leveraging explainable machine learning on clinical data to provide transparent, real-time stroke risk assessments. Not just a prediction a clinical decision support tool.
Annual stroke deaths in Nigeria
Model accuracy achieved
Patients analyzed in dataset
ML models ensembled
Real-Time Analysis
Get instant stroke risk predictions as you input patient data. No waiting, no delays results in milliseconds.
Explainable AI (SHAP)
Every prediction comes with transparent explanations. See exactly which factors contribute to risk and by how much.
What-If Simulator
Adjust risk factors with interactive sliders and watch how lifestyle changes impact stroke risk in real-time.
Multi-Model Ensemble
Four machine learning models Random Forest, XGBoost, Logistic Regression, and Neural Network working together for reliable predictions.
Stroke Risk Assessment
Enter patient health data below. The risk gauge updates in real-time as you type. Hit "Analyze" for a full explainable report.
Fill in all fields for the most accurate prediction
High blood pressure
Pre-existing condition
Normal: 70-100 mg/dL
Normal: 18.5-24.9
Updates as you type. Click "Run Full Analysis" for detailed SHAP explanations.
Fill the form
Data Analytics
Explore the stroke prediction dataset with interactive visualizations. Understanding the data is key to trusting the model.
5,110
Total Patients
records analyzed
249
Stroke Cases
4.9% of dataset
4,861
No Stroke
95.1% of dataset
10
Features
clinical attributes
Stroke incidence increases dramatically with age
Which features the model relies on most (SHAP global values)
What-If Risk Reduction
Adjust modifiable risk factors and watch how lifestyle changes impact stroke risk in real-time.
Scenario: A 65-year-old male smoker with hypertension and elevated glucose
Risk Reduction
0.0%
0.0% → 0.0%
No ChangeUnderstanding Stroke
Knowledge is the first line of defense. Learn the warning signs, risk factors, and prevention strategies.
The FAST Warning Signs
Face Drooping
One side of the face may droop or become numb. Ask the person to smile is it uneven or lopsided?
Arm Weakness
Sudden numbness or weakness in one arm. Ask the person to raise both arms does one drift downward?
Speech Difficulty
Slurred speech or inability to repeat a simple sentence correctly. Is the person's speech confused or garbled?
Time to Call Emergency
If any of these signs are present, call emergency services immediately. Every minute counts time is brain tissue.
Emergency: Call 112 (Nigeria)
If you or someone around you shows any FAST signs, do not wait. Call emergency services immediately.
Key Risk Factors
High Blood Pressure
The leading cause of stroke. Manage with medication, diet, and exercise.
Heart Disease
Atrial fibrillation and other heart conditions can cause blood clots that lead to stroke.
Diabetes
Diabetics have 1.5x higher stroke risk. Blood sugar control is critical.
Smoking
Damages blood vessels and raises blood pressure. Quitting reduces risk by 50% within a year.
Prevention Strategies
Maintain a healthy blood pressure through regular monitoring and medication
Exercise at least 150 minutes per week brisk walking counts
Follow a balanced diet rich in fruits, vegetables, and whole grains
Quit smoking and limit alcohol consumption
Manage diabetes and maintain healthy cholesterol levels
Get regular health check-ups, especially after age 45
Model Methodology
Our approach from raw data to a deployable clinical tool.
Data Collection
Kaggle Stroke Prediction Dataset 5,110 patient records with 10 clinical features
Preprocessing
BMI imputation (median), one-hot encoding, SMOTE for class balancing (5% → 50% positive)
Model Training
4 models trained: Random Forest, XGBoost, Logistic Regression, Neural Network
Evaluation
Stratified 5-fold cross-validation, optimized for F1-score and ROC-AUC on imbalanced data
Explainability
SHAP values computed for model transparency every prediction is explainable
Deployment
FastAPI backend serving the model, Next.js frontend for real-time predictions