Session Ready
Exercise

Elbow reading

Determining the right number of clusters is one of the most crucial steps in developing a clustering model.

In this exercise, you will apply K-means clustering and the "elbow method" to determine the correct number of clusters present in the dataset at hand.

The data is loaded in the variable X and you have been provided with two functions for your convenience, plot_clusters() and plot_elbow_curve(), to facilitate the discovery process.

Your task is to specify the range of numbers of clusters over which to scan in order to produce the "elbow curve".

Instructions 1/2
undefined XP
  • 1
  • 2
  • Set the values of start and stop parameters of the range() function in the first line to 2 and 6, respectively.