Path: blob/main/ML/5. KNN on Diabetes/KNN_on_Diabetes.ipynb
442 views
Kernel: Python 3.8.6 64-bit
Implement K-Nearest Neighbors algorithm on diabetes.csv dataset. Compute confusion matrix, accuracy, error rate, precision and recall on the given dataset
In [1]:
In [2]:
Out[2]:
In [4]:
Out[4]:
Pregnancies 0
Glucose 0
BloodPressure 0
SkinThickness 0
Insulin 0
BMI 0
Pedigree 0
Age 0
Outcome 0
dtype: int64
In [6]:
Out[6]:
In [7]:
In [22]:
In [23]:
In [24]:
Out[24]:
Confusion Matrix
[[88 19]
[19 28]]
Accuracy Score: 0.7532467532467533
Reacal Score: 0.5957446808510638
F1 Score: 0.5957446808510638
Precision Score: 0.5957446808510638
In [ ]: