Skip to content

Instantly share code, notes, and snippets.

@kushalchauhan98
Created August 2, 2018 14:10
Show Gist options
  • Save kushalchauhan98/510431340f90340ebf5b0c5f29ca384f to your computer and use it in GitHub Desktop.
Save kushalchauhan98/510431340f90340ebf5b0c5f29ca384f to your computer and use it in GitHub Desktop.
Clustering
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