Hi there, I am trying to do image classification using hierarchical clustering. So, I have my data, and apply this steps:
from scipy.cluster.hierarchy import dendrogram, linkage data1 = np.array(data) Z = linkage(data, 'ward') dendrogram(Z, truncate_mode='lastp', p=12, show_leaf_counts=False, leaf_rotation=90., leaf_font_size=12.,show_contracted=True) plt.show() So, I can see the dendrogram with 12 clusters as I want, but I dont know how to use this to classify the image. Also, I understand that funtion cluster.hierarchy.cut_tree(Z, n_clusters), that cut the tree at that number of clusters, but again I dont know how to procedd from there. I would like to have something like: cluster = predict(Z, instance) Any advice or direction would be really appreciate, Thanks in advance, Jaime -- *Jaime Lopez Carvajal*
_______________________________________________ scikit-learn mailing list [email protected] https://mail.python.org/mailman/listinfo/scikit-learn
