sklearn.cluster.KMeans中n_init参数是什么意思解决方法
sklearn.cluster.KMeans中n_init参数是什么意思
n_init解释为:
Number of time the k-means algorithm will be run with different centroid seeds. The
final results will be the best output of n_init consecutive runs in terms of inertia.
设置选择质心种子次数,默认为10次。返回质心最好的一次结果(好是指计算时长短)
这个到底是嘛意思?
------解决思路----------------------
每一次算法运行时开始的centroid seeds是随机生成的, 这样得到的结果也可能有好有坏. 所以要运行算法n_init次, 取其中最好的.
n_init解释为:
Number of time the k-means algorithm will be run with different centroid seeds. The
final results will be the best output of n_init consecutive runs in terms of inertia.
设置选择质心种子次数,默认为10次。返回质心最好的一次结果(好是指计算时长短)
这个到底是嘛意思?
------解决思路----------------------
每一次算法运行时开始的centroid seeds是随机生成的, 这样得到的结果也可能有好有坏. 所以要运行算法n_init次, 取其中最好的.