Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

plotting a dendrogram from the distance matrix

# Import the dendrogram function
from scipy.cluster.hierarchy import dendrogram

# Create a dendrogram
dn = dendrogram(distance_matrix)

# Display the dendogram
plt.show()
Source by campus.datacamp.com #
 
PREVIOUS NEXT
Tagged: #plotting #dendrogram #distance #matrix
ADD COMMENT
Topic
Name
6+7 =