How to get cluster centers for each iteration of KMeans
in scikit-learn using Python.
from sklearn.cluster import KMeans
kmeans = KMeans(n_clusters=3, init='k-means++', max_iter=4, random_state=42)
y_kmeans = kmeans.fit(X)
print(kmeans.n_iter_)
centroid.append(kmeans.cluster_centers_)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…