Python, Machine Learning, Clustering, K Means, Sklearn.
k-means model = KMeans(n_clusters=2) model.fit(X) labels = model.predict(X) # plot plt.scatter(X[:, 0], X[:, 1], c=labels) plt.scatter(model.cluster_centers_[:, 0], model.cluster_centers_[:, 1], marker='x', s=200, linewidths=3, color='r') plt.show() Image by the author. As told above, K-Means