The idea: a simple web form where someone enters eight routine measurements (glucose, BMI, blood pressure, age and others) and gets an estimated diabetes risk.
What I built: a logistic regression model trained on the Pima Indians Diabetes dataset (768 women, 35% with diabetes), served as a Streamlit app.
Results on 154 held-out patients
| Metric | Value |
|---|---|
| Accuracy | 75.3% |
| Precision (diabetes) | 64.9% |
| Recall (diabetes) | 67.3% |
| F1 (diabetes) | 0.661 |
Glucose is the strongest single signal (correlation 0.47 with the outcome), followed by BMI and age.
A bug I fixed: the first version saved the model without its scaler, so the app fed raw values to a model trained on scaled ones and answered "positive" for every input. The model and scaler are now saved as one pipeline, and the app shows an estimated probability rather than a yes or no.
A learning project, not a medical test.