Elbow Method to Chose the K Value

Learn how to choose a better k value to improve our modeling.

We'll cover the following

Let’s explore if we can improve the model using a better value of kk.

Elbow method

To do this, we can use the elbow method to find a good value for kk. We iterate a range of KNN models using different kk values in the elbow method. Let’s try using the odd value of kk. We get the error rate for every kk value and plot it against kk to find its optimum value.

Get hands-on with 1200+ tech skills courses.