KeyError 2 , what is that?

the above code on Diabetes train data is showing key error. what is that?

Hey @soberVrases, i ran your code for a sample dataset, and it ran perfectly fine,

Check shape of X_train and Y_train first, if error persists than share your ipynb file.

hope this resolved your doubt.
Plz mark it as resolved in my doubts section. :blush:

thanks, it worked but now my accuracy is not getting better than 77, i have tried value of k to be 5, 10 and 15?

Hey @soberVrases, yes 77 is maximum achievable accuracy by the knn. Kudos to your work. If you want to achieve more, you need to use deep learning techniques, but for the time being no need to ponder on that, proceed with the course.

hope this resolved your doubt.
Plz mark it as resolved in my doubts section. :blush:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.