kendrickfff/Disease-Progression-Prediction
0
📉 Diabetes — Disease Progression Prediction (Linear Regression)
A Linear Regression model trained on the Diabetes dataset from Azure Open Datasets to predict Y (a quantitative measure of disease progression one year after baseline).
Built and deployed on Microsoft Fabric during Offline Workshop Training — organized by Microsoft Elevate and Dicoding.
📊 Model Details
📝 Features (10)
📈 Performance
Best Model: Linear Regression
All Models Compared
ℹ️ Note: An R² of ~0.39 is typical for clinical datasets where disease progression depends on many unmeasured factors (genetics, lifestyle, diet). Interestingly, Linear models outperform tree-based models here due to the small sample size (442 rows), avoiding overfitting.
💻 Usage
import pickle
import numpy as np
# Load model (ensure model.pkl is in the directory)
with open("model.pkl", "rb") as f:
model = pickle.load(f)
# Input: [AGE, SEX, BMI, BP, S1, S2, S3, S4, S5, S6]
# Example: Patient with average stats
sample = np.array([[50, 1, 28.5, 90.0, 200, 120.5, 45.0, 4.5, 5.2, 95]])
# Predict Disease Progression
prediction = model.predict(sample)
print(f"Predicted Disease Progression (Y): {prediction[0]:.2f}")
🔍 Key Insights
- S5 (Log of Serum Triglycerides) is the most important predictor by far (Coefficient:
65.8), indicating a strong correlation with disease progression. - SEX and BMI are the 2nd and 3rd most influential features.
- Simplicity wins: Linear Regression outperforms complex ensemble models on this small dataset. Simpler models often generalize better when data is limited (
n=442). - Stability: Cross-validation shows moderate stability (
CV R² = 0.48 ± 0.05), suggesting the model is robust within its performance range.
⚖️ Feature Importance
Ranked by the absolute value of coefficients:
⚠️ Intended Use
- Primary: Educational / demonstration of ML workflow on Microsoft Fabric.
- Not intended for: Clinical decision-making without further validation.
🙌 Acknowledgments
- Microsoft Elevate and Dicoding — for organizing Offline Workshop Training.
- Azure Open Datasets — for providing the Diabetes dataset.
