Created
July 19, 2016 17:17
-
-
Save kushalvyas/590b7e1adad10656793cfb78f041193a 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
n_samples = 1000 | |
n_features = 5; | |
n_clusters = 3; | |
# aint this sweet | |
X, y = make_blobs(n_samples, n_features) | |
# X => array of shape [nsamples,nfeatures] ;;; y => array of shape[nsamples] | |
# X : generated samples, y : integer labels for cluster membership of each sample | |
# performing KMeans clustering | |
ret = KMeans(n_clusters = n_clusters).fit_predict(X) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
make_blobs is part of sklearn I presume?