Skip to content

Instantly share code, notes, and snippets.

@mabugamm
Created June 21, 2019 22:27
Show Gist options
  • Save mabugamm/9948c94665473a417fa6306d70da7f44 to your computer and use it in GitHub Desktop.
Save mabugamm/9948c94665473a417fa6306d70da7f44 to your computer and use it in GitHub Desktop.
K means
from sklearn.datasets import make_blobs
import matplotlib.pyplot as plt
X, y = make_blobs(
n_samples=150, n_features=2,
centers=5, cluster_std=0.5,
shuffle=True, random_state=0
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment