1. Learn
  2. /
  3. Courses
  4. /
  5. Cluster Analysis in Python

Exercise

Hierarchical clustering: single method

Let us use the same footfall dataset and check if any changes are seen if we use a different method for clustering.

The data is stored in a pandas DataFrame, 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

100 XP
  • Import fcluster and linkage from scipy.cluster.hierarchy.
  • Use the single method in the linkage() function.