Skip to content

Joe-Naz01/fine_tuning_supervised

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Diabetes Onset Prediction — Logistic Regression + Hyperparameter Tuning

Problem. Predict diabetes onset from clinical features to support early intervention.

Data. ./diabetes_clean.csv (columns include: pregnancies, glucose, diastolic, triceps, insulin, bmi, dpf, age, diabetes).

Approach.

  • Baseline Logistic Regression; ROC curve + confusion matrix.
  • Compared against KNN (logistic performed better across metrics).
  • Hyperparameter tuning with GridSearchCV and RandomizedSearchCV.
  • Evaluated with train/test split; tracked accuracy, precision, recall, F1, ROC-AUC.

Results.

  • Logistic > KNN on all reported metrics.
  • ROC-AUC ≈ 0.801; accuracy ≈ 0.68; balanced performance across classes.

What I Learned.

  • Interpreting coefficients and thresholds via ROC.
  • Why CV-based tuning improves generalization.
  • How metric choice (F1 vs AUC) shifts model selection.

Quick Start

# clone if standalone
git clone https://github.com/Joe-Naz01/fine_tuning_supervised.git
cd fine_tuning_supervised

python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -r requirements.txt
jupyter notebook

About

Diabetes Prediction (LogReg + Tuning) — Built a logistic regression model to predict diabetes onset, plotted ROC curves, and evaluated with accuracy, precision, recall, F1, and ROC-AUC. Compared vs KNN (logistic performed better). Applied GridSearchCV/RandomizedSearchCV to tune hyperparameters and improve generalization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors