Created
February 6, 2019 18:35
-
-
Save TheLoneNut/7343e11e603dfed359daec85f4e087a2 to your computer and use it in GitHub Desktop.
This file contains 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 sklearn.cluster import MiniBatchKMeans | |
num_clusters = 80 | |
kn = MiniBatchKMeans(n_clusters=num_clusters, init_size=max(300, 3*num_clusters)).fit(X) | |
labels = kn.labels_ | |
n_clusters_ = len(set(labels)) - (1 if -1 in labels else 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment