I have a distance matrix presents the distance matrix for pairwise elements such as
A B C D ..... A n1 n2 n3 B n1 C n2 n4 D n3 n5 ....... E.........
i input the array like for clustering
arry= [ 0 n1, n2, n3.. n1....... n2 n4 n3 n5 ] Y=sch.linkage(arry,'single') cutoff=1e-6 T=sch.fcluster(Y, cutoff,'distance') print T Z=sch.dendrogram(Y, color_threshold=cutoff)
my fcluster output is like [ 4 10 12 1 5 13 2 11 1 7 8 3 14 6 10 16 9 15 1 7] from a previous poster of others Clustering with scipy - clusters via distance matrix, how to get back the original objects
I understand the output T[i] only presents the number of element in a cluster ..how I link the original element A, B ,C ,D ,E..... elements with the cluster result and the dendrogram? and lab them properly into my figures.