Performance comparison of Ridge (L2) and Lasso (L1) regression models on the Diabetes dataset.
Objective: Identify the most effective regularization method for blood glucose level prediction.
- Data preprocessing pipeline
- Hyperparameter optimization with GridSearchCV
- Coefficient analysis and visualization
- Model performance comparison
Source: diabetes_clean.csv (768 samples)
Target Variable: glucose (blood glucose level)
Key Features:
- pregnancies
- diastolic (blood pressure)
- triceps (skin thickness)
- diabetes (diagnosis)
- age
- bmi
| Model | Best Alpha |
|---|---|
| 1 | |
| 0.1 |
| Feature | Ridge | Lasso |
|---|---|---|
| diabetes | 24.87 | 24.60 |
| dpf | 1.70 | 0.81 |
| age | 0.49 | 0.49 |
| pregnancies | -0.46 | -0.45 |
- Ridge: Balanced shrinkage while retaining all features
- Lasso: 52% coefficient reduction for
dpffeature - Common Finding:
diabetesis the strongest predictor
git clone https:/barisgudul/Ridge_vs_Lasso_Analysis.git
cd Ridge_vs_Lasso_Analysis# Run the analysis script
jupyter notebook LvsR.ipynbPermissions:
✅ Free academic/research use
✅ Modification and redistribution
❌ Commercial use requires written consent
Full license terms available in LICENSE file.
Contribution Guidelines:
We welcome collaborations! Please reach out via email before submitting PRs.
