I have the following program where data is a pandas.DataFrame: from scipy.cluster.hierarchy import linkage Z = linkage(data, method='ward', metric='euclidean') clusters = fcluster(Z, 2, criterion='maxclust') Now, considering a set of new elements that have the same structure as data, how do i know which cluster do they belong to? Continue reading...