Skip to content

barisgudul/Ridge_vs_Lasso_Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Ridge vs Lasso Regression Comparison

📌 Project Overview

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.

Ridge vs Lasso Coefficients

🚀 Key Features

  • Data preprocessing pipeline
  • Hyperparameter optimization with GridSearchCV
  • Coefficient analysis and visualization
  • Model performance comparison

📊 Dataset Information

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 Details

Optimized Parameters

Model Best Alpha
Ridge 1
Lasso 0.1

Coefficient Comparison

Feature Ridge Lasso
diabetes 24.87 24.60
dpf 1.70 0.81
age 0.49 0.49
pregnancies -0.46 -0.45

📈 Key Results

  • Ridge: Balanced shrinkage while retaining all features
  • Lasso: 52% coefficient reduction for dpf feature
  • Common Finding: diabetes is the strongest predictor

🛠️ Installation

git clone https:/barisgudul/Ridge_vs_Lasso_Analysis.git
cd Ridge_vs_Lasso_Analysis

🖥️ Usage

# Run the analysis script
jupyter notebook LvsR.ipynb

📄 License

MIT License
License: MIT

Permissions:
✅ Free academic/research use
✅ Modification and redistribution
❌ Commercial use requires written consent

Full license terms available in LICENSE file.


📧 Contact Information

Project Maintainer
Author Badge
Email
LinkedIn

Contribution Guidelines:
We welcome collaborations! Please reach out via email before submitting PRs.