python - Pruning dendrogram at levels in Scipy Hierarchical Clustering -


I have a lot of data points which, using Scipy hierarchical clustering in the following way There are clusters. Suppose I want to sort out dendroog at the '1500' level? How to do it (I have tried to use the 'P' parameter and this is not what I am hoping for)

  Z = dendrag (linkmatrix, truncate_mode = 'last' ', color_thylhold = 1, label = DF Session.tolist (), distance_sort = 'ascending') plt.title ("Hieratic clustering") plt.show ()  

Specified, if a cluster node is under color_thresthold , then all its descendants are equal to (Not blue) will be. The links linking the nodes above to color_threshold will be blue.

In your example, color_threshold = 1 . Since all nodes are above 1 , all links are blue. Instead of

  Z = denroidog (linkage_matrix, color_thold = 1500, distance_sort = 'ascending')  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -