Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
tags:
|
| 4 |
+
- sklearn
|
| 5 |
+
- diabetes
|
| 6 |
+
- regression
|
| 7 |
+
- gradient-boosting
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# Diabetes Disease Progression Predictor
|
| 11 |
+
|
| 12 |
+
A **Gradient Boosting Regressor** trained on the
|
| 13 |
+
[sklearn Diabetes dataset](https://scikit-learn.org/stable/datasets/toy_dataset.html#diabetes-dataset)
|
| 14 |
+
to predict disease progression one year after baseline (continuous target).
|
| 15 |
+
|
| 16 |
+
## Results
|
| 17 |
+
|
| 18 |
+
| Metric | Value |
|
| 19 |
+
|--------|-------|
|
| 20 |
+
| Test MAE | **44.80** |
|
| 21 |
+
| Test R² | **0.4366** |
|
| 22 |
+
| CV R² (5-fold) | **0.3543** |
|
| 23 |
+
|
| 24 |
+
## Feature Importances
|
| 25 |
+
|
| 26 |
+
| Feature | Importance |
|
| 27 |
+
|---------|-----------|
|
| 28 |
+
| bmi | 0.3688 |
|
| 29 |
+
| s5 | 0.2360 |
|
| 30 |
+
| bp | 0.0869 |
|
| 31 |
+
| s2 | 0.0763 |
|
| 32 |
+
| age | 0.0559 |
|
| 33 |
+
| s6 | 0.0495 |
|
| 34 |
+
| s1 | 0.0474 |
|
| 35 |
+
| s3 | 0.0392 |
|
| 36 |
+
| s4 | 0.0277 |
|
| 37 |
+
| sex | 0.0122 |
|
| 38 |
+
|
| 39 |
+
## Features
|
| 40 |
+
|
| 41 |
+
The model uses 10 baseline variables: age, sex, BMI, blood pressure,
|
| 42 |
+
and 6 blood serum measurements (s1–s6).
|
| 43 |
+
|
| 44 |
+
## Usage
|
| 45 |
+
|
| 46 |
+
```python
|
| 47 |
+
import joblib
|
| 48 |
+
from huggingface_hub import hf_hub_download
|
| 49 |
+
|
| 50 |
+
model_path = hf_hub_download(repo_id="Soulay/diabetes-predictor", filename="model.joblib")
|
| 51 |
+
model = joblib.load(model_path)
|
| 52 |
+
|
| 53 |
+
# [age, sex, bmi, bp, s1, s2, s3, s4, s5, s6] (standardised values)
|
| 54 |
+
prediction = model.predict([[0.05, -0.04, 0.06, 0.02, -0.01, 0.0, -0.03, 0.04, 0.02, -0.01]])
|
| 55 |
+
print(prediction) # e.g. [152.3]
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
## Training
|
| 59 |
+
|
| 60 |
+
Model trained automatically via GitHub Actions CI/CD on every push to `main`.
|