Kmeans错误py:870: FutureWarning: The default value of `n_init` will change from 10 to ‘auto‘ in 1.4.

sklearn Kmeans聚类算法遇到的错误py:870: FutureWarning: The default value of n_init will change from 10 to ‘auto’ in 1.4. Set the value of n_init explicitly to suppress the warning warnings.warn(

在这里插入图片描述
遇到如上错误找到如下解决方法:
Kmeans错误py:870: FutureWarning: The default value of `n_init` will change from 10 to ‘auto‘ in 1.4._第1张图片
大概就是sklearn 1.4版更新
我们将n_init= 'auto’输入即可
结果如下Kmeans错误py:870: FutureWarning: The default value of `n_init` will change from 10 to ‘auto‘ in 1.4._第2张图片

你可能感兴趣的:(kmeans,机器学习,聚类,python,sklearn)