SciPy - Clustering and Distance
What will be the output of this code snippet?
from scipy.cluster.hierarchy import linkage, fcluster import numpy as np X = np.array([[1, 2], [1, 4], [5, 2], [5, 4]]) Z = linkage(X, 'single') clusters = fcluster(Z, t=3, criterion='distance') print(clusters)
