Skip to content

shretimag/Diabetes-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฉบ Diabetes Prediction using Supervised Learning

๐Ÿ” Project Overview

This project applies supervised machine learning algorithms to predict whether a patient is diabetic based on diagnostic medical attributes. Using the Pima Indians Diabetes Dataset, we trained and evaluated multiple classification models to identify high-risk individuals and assist in early detection.


๐Ÿ“Š Dataset


๐Ÿš€ Features Implemented

  • โœ… Data cleaning & exploration
  • โœ… Feature scaling with StandardScaler
  • โœ… Model training: Logistic Regression, Random Forest, and SVM
  • โœ… Model evaluation using:
    • Accuracy, Precision, Recall, F1-Score
    • Confusion Matrix & Classification Report
    • ROC Curve & AUC Score
  • โœ… Single-patient prediction with real data simulation
  • โœ… Clean, modular, and well-commented code

๐Ÿง  Algorithms Used

Model Description
Logistic Regression Interpretable baseline classifier
Random Forest Ensemble method for robust predictions
Support Vector Machine (SVM) Effective for small-to-medium datasets with scaling

๐Ÿ“ˆ Performance

The Random Forest classifier showed the best performance with:

  • Accuracy: ~85%
  • ROC AUC Score: High discriminative power
  • Balanced precision and recall, ideal for medical diagnosis

๐Ÿ”ฎ Sample Prediction

sample = np.array([[6, 148, 72, 35, 0, 33.6, 0.627, 50]])
sample_scaled = scaler.transform(sample)
prediction = model.predict(sample_scaled)

๐Ÿ› ๏ธ Tech Stack

  • Python (NumPy, Pandas, Scikit-Learn)
  • Matplotlib & Seaborn for visualizations
  • Jupyter Notebook / Google Colab

๐Ÿ’กFuture Improvements

  • Hyperparameter tuning using GridSearchCV
  • Model deployment with Streamlit or Flask
  • Cross-validation and imputation for missing values
  • Advanced models like XGBoost or LightGBM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published