Thanks for your question, if you observe in code the K value starts from 1 so you can get that index of minimal error rate at K = 37 not K = 38.
Machine Learning | Data Science Practitioner, Connect with me on LinkedIn - https://linkedin.com/in/amey23/ Twitter — https://twitter.com/AmeyBand4
Love podcasts or audiobooks? Learn on the go with our new app.