Skip to content

Instantly share code, notes, and snippets.

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