Skip to content
Course Notes: Cluster Analysis in Python
Course Notes
Use this workspace to take notes, store code snippets, and build your own interactive cheatsheet!
# Import any packages you want to use here
Take Notes
Add notes here about the concepts you've learned and code cells with code you want to keep.
Creating a distance matrix using linkage
# Add your code snippets here
scipy.cluster.hierarchy.linkage(observations, method='single', metric='euclidean', optimal_ordering=False)
# Assign cluster labels
comic_con['cluster_labels'] = fcluster(distance_matrix, 2, criterion='maxclust')