Sklearn Kmeans parameter confusion?

后端 未结 1 1881
说谎
说谎 2021-01-12 12:01

So I can run sklearn kmeans as the following:

kmeans = KMeans(n_clusters=3,init=\'random\',n_init=10,max_iter=500)

But I\'m a

相关标签:
1条回答
  • 2021-01-12 12:41

    With max_iter=2 and n_init=15, kmeans will choose initial centroids 15 times and move up to twice on each of the 15 runs.

    The default values are n_init=10 and max_iter=300. This means the initial centroids will be chosen 10 times, and each run will use up to 300 iterations. The best out of those 10 runs will be the final result.

    0 讨论(0)
提交回复
热议问题