Skip to content

Instantly share code, notes, and snippets.

@GeorgeSeif
Created January 30, 2021 18:14
Show Gist options
  • Save GeorgeSeif/da5f8bf9172d5c78c7ebdb892cb47a42 to your computer and use it in GitHub Desktop.
Save GeorgeSeif/da5f8bf9172d5c78c7ebdb892cb47a42 to your computer and use it in GitHub Desktop.
clf = KMeans(n_clusters=10)
s = time.time()
clf.fit(data)
e = time.time()
print("Training time = {}".format(e - s))
s = time.time()
clf.predict(data)
e = time.time()
print("Prediction time = {}".format((e - s) / data_size))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment