I\'m trying to build a dendrogram using the children_
attribute provided by AgglomerativeClustering
, but so far I\'m out of luck. I can\'t use sc
Use the scipy implementation of agglomerative clustering instead. Here is an example.
from scipy.cluster.hierarchy import dendrogram, linkage
data = [[0., 0.], [0.1, -0.1], [1., 1.], [1.1, 1.1]]
Z = linkage(data)
dendrogram(Z)
You can find documentation for linkage
here and documentation for dendrogram
here.