Created
August 2, 2018 14:10
-
-
Save kushalchauhan98/510431340f90340ebf5b0c5f29ca384f to your computer and use it in GitHub Desktop.
Clustering
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
import numpy as np | |
from sklearn.cluster import KMeans | |
n_clusters = np.ceil(len(encoded)**0.5) | |
kmeans = KMeans(n_clusters=n_clusters) | |
kmeans = kmeans.fit(encoded) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment