Skip to content

SoumyaCO/KNeighbors-classifier-diabetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open In Colab

Predicting Diabetes using KNeighborsClassifier.

accuracy vs n_neighbors graph

1. 🎯 Aim:

Train a model with the diabetes data to predict a patient has diabetes or not.

2. 📚 Concepts Covered:

  • Data Manupulation
  • Feature Engineering
  • Scaling a dataset
  • Hyperparameter tuning with GridSearchCV
  • confusion_matix
  • F1_score, precision
  • Data Visualization

3. 🔎 Approach:

  • Importing the data
  • Understanding the features
  • Cleaning the data
  • Scale and Impute the data
  • Instantiate a KNeighborsClassifier() model from sklearn.neighbors
  • To have the right number of n_neighbors performed GridSearchCV
  • After getting the grid.best_params_ visualized confusion_matrix
  • Calculated Precision, Recall, F1_score
  • Lastly visualized a accuracy vs n_neighbors plot

👉 In the notebook I've provided detailed codes and concepts. If you like it please give a star ⭐️

❗If you are trying it in google colab you have to upload the dataset [dibetes.csv]

🧑🏻‍💻 My Profile: