How mohamedhamed5/diabetes_prediction_project works
This is a Streamlit diabetes-risk prediction assistant. A user enters health features, submits them for scaled three-class prediction, reviews probabilities and an interpretation, and can have the encounter recorded and download a PDF report. A separate model-development script explores the BRFSS dataset, balances training data with SMOTE, evaluates logistic regression, and saves the model and scaler used by the app. The source excerpts show these responsibilities, but not a separate service boundary; both runtime and training are implemented in single Python files.
Main entry points: app.py Prediction engine · model.py Training pipeline · model.pkl Classifier · scaler.pkl Feature scaler
Components 13
Prediction experience
- Health form
code/app.py - Results view
code/app.py
Prediction and records
- Prediction engine
code/app.py - Classifier
model.pkl - Feature scaler
scaler.pkl - Patient records
patients_records.csv - PDF report
code/app.py - Report files
Patient files
Model development
- BRFSS dataset
diabetes_012_health_indicators_BRFSS2015.csv - Training pipeline
code/model.py - Model evaluation
code/model.py - Analysis figures
figures
Other components
- Patient
Connections 14
- Patient → Health form: enters features
code/app.py - Health form → Prediction engine: submits features
code/app.py - Prediction engine → Feature scaler: transforms with
code/app.py - Prediction engine → Classifier: predicts with
code/app.py - Prediction engine → Results view: renders probabilities
code/app.py - Prediction engine → Patient records: appends record
code/app.py - Prediction engine → PDF report: creates report
code/app.py - PDF report → Report files: writes PDF
code/app.py - Results view → Patient: offers download
code/app.py - BRFSS dataset → Training pipeline: loads data
code/model.py - Training pipeline → Model evaluation: evaluates model
code/model.py - Training pipeline → Analysis figures: saves analysis
code/model.py - Training pipeline → Classifier: saves classifier
code/model.py - Training pipeline → Feature scaler: saves scaler
code/model.py