Last active
October 17, 2019 23:21
-
-
Save nchibana/d83461a51d889ca7d25d5ac5cd2f63a5 to your computer and use it in GitHub Desktop.
hierarchical clustering
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from scipy.cluster.hierarchy import fcluster | |
| import scipy.cluster.hierarchy as hac | |
| Z = hac.linkage(df_interpolate.iloc[:,0:266], method='ward', metric='euclidean') | |
| # k Number of clusters I'd like to extract | |
| results = fcluster(Z, k, criterion='maxclust') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment