Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

scikit learn - how to find cluster center in every iteration of k-means sklearn python

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_)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...