Created
October 13, 2019 19:08
-
-
Save netsatsawat/47666fe7fb86c340c937084cad1c16e0 to your computer and use it in GitHub Desktop.
Generate data blob for clustering tutorial
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 sklearn.datasets import make_blobs | |
import numpy as np | |
SEED = 123 | |
N_SAMPLES = 10000 | |
N_FEATURES = 2 | |
N_CENTERS = 5 | |
np.random.seed(SEED) | |
X, y = make_blobs(n_samples=N_SAMPLES, n_features=N_FEATURES, centers=N_CENTERS, | |
cluster_std=1.3, shuffle=True, random_state=SEED) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment