Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/soumyaco/kneighbors-classifier-diabetes

Diabetes prediction using KNN-Classifier algorithm. Step by step guided notebook
https://github.com/soumyaco/kneighbors-classifier-diabetes

data-science data-visualization diabetes-dateset-analysis diabetes-prediction knn-classification machine-learning-algorithms python3

Last synced: 14 days ago
JSON representation

Diabetes prediction using KNN-Classifier algorithm. Step by step guided notebook

Awesome Lists containing this project

README

        


Open In Colab

# Predicting Diabetes using KNeighborsClassifier.
![accuracy vs n_neighbors graph](https://github.com/SoumyaCO/KNeighbors-classifier-diabetes/blob/main/knn-image.png)
### 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:
> * [πŸ”—LinkedIn ](https://www.linkedin.com/in/soumyadip-bhattacharjya-993974234/)
> * [πŸ”— Kaggle](https://www.kaggle.com/soumyadipbhat)