Session Ready
Exercise

Elbow method on distinct clusters

Let us use the comic con data set to see how the elbow plot looks on a data set with distinct, well-defined clusters. You may want to display the data points before proceeding with the exercise.

The data is stored in a Pandas data frame, comic_con. x_scaled and y_scaled are the column names of the standardized X and Y coordinates of people at a given point in time.

Instructions 1/2
undefined XP
  • 1
  • 2
  • Create a list of distortions for each cluster in num_clusters.
  • Create a data frame elbow_plot with num_clusters and distortions.
  • With the .lineplot() method, plot elbow_plot with num_clusters in the x axis and distortions in the y axis.