Note that this task assumes
scikit-learn version 1.2.2 We are working with the following 2D dataset (should be downloaded to solve this task):
You have the following starter code:
from sklearn.preprocessing import StandardScaler
from sklearn.cluster import AgglomerativeClustering
data = np.load('clusterable_data.npy') # assuming the downloaded file is saved in the working directory
scale = StandardScaler()
reduced_X = scale.fit_transform(data)
Fit AgglomerativeClustering() with n_clusters = 6 and 4 different linkages: Ward's linkage, average linkage, complete linkage, and single linkage. Plot the clustering results for each linkage. Which linkage produces the most imbalanced clusters?