Answers for "hierarchical clustering dendrogram python example"

0

hierarchical clustering dendrogram python example

from scipy.cluster.hierarchy import dendrogram, linkage
from matplotlib import pyplot as plt

linked = linkage(X, 'single')

labelList = range(1, 11)

plt.figure(figsize=(10, 7))
dendrogram(linked,
            orientation='top',
            labels=labelList,
            distance_sort='descending',
            show_leaf_counts=True)
plt.show()
Posted by: Guest on May-13-2020

Code answers related to "hierarchical clustering dendrogram python example"

Python Answers by Framework

Browse Popular Code Answers by Language