from sklearn import cluster[centroid, label, inertia] = cluster.k_means(data_to_be_classified, num_of_clusters)
【Python_K-means算法】转载于:https://www.cnblogs.com/ZhengPeng7/p/7534526.html
from sklearn import cluster[centroid, label, inertia] = cluster.k_means(data_to_be_classified, num_of_clusters)