Skip to content

Bijayakumar2005/YBI_Foundation_Project_Binary_Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Binary Classification Project

This project performs binary classification using the Pima Indians Diabetes Dataset. The aim is to predict whether a patient is likely to have diabetes based on various medical attributes such as glucose level, blood pressure, insulin level, BMI, etc.

πŸ“ Dataset

The dataset used in this project is sourced from YBI Foundation GitHub Datasets.
It contains the following features:

  • pregnancies
  • glucose
  • diastolic
  • triceps
  • insulin
  • bmi
  • dpf (diabetes pedigree function)
  • age
  • diabetes (target label: 0 or 1)

πŸ”§ Steps Implemented

  1. Import Libraries

    • pandas
    • sklearn (for train/test split, logistic regression, metrics)
  2. Data Loading & Exploration

    • Loaded dataset with pd.read_csv()
    • Used .head(), .info(), .describe() for initial analysis
  3. Preprocessing

    • Defined features X and target y
    • Split data into training and testing sets (80/20 split)
  4. Model Training

    • Used LogisticRegression model from sklearn
    • Trained the model on the training data
  5. Prediction & Evaluation

    • Made predictions on the test set
    • Evaluated model with confusion_matrix, accuracy_score, and classification_report

πŸ“ˆ Results

  • Accuracy: ~76.6%
  • Precision, Recall, F1-score available for both classes in the report.

πŸ“Š Sample Output

              precision    recall  f1-score   support

           0       0.76      0.92      0.83       145
           1       0.79      0.52      0.63        86

    accuracy                           0.77       231
   macro avg       0.78      0.72      0.73       231
weighted avg       0.77      0.77      0.76       231
βœ… Conclusion
The logistic regression model performs reasonably well in predicting diabetes based on the given features. The dataset is imbalanced, which slightly affects the recall for class 1.

πŸ‘€ Author
Bijaya Kumar Rout
πŸ“§ bijayakumarrout2005@gmail.com

πŸ“Œ Note
This notebook is a part of the YBI Foundation Data Science Project on binary classification. You can open the notebook locally or on a Jupyter-supported platform for better rendering of plots and outputs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors