সম্পাদনা
from scipy.cluster.hierarchy import linkage, fcluster data = [ [1, 2], [2, 3], [8, 9], [9, 10] ] tree = linkage(data, method="ward") result = fcluster(tree, t=2, criterion="maxclust") print(result)
পূর্বরূপ