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(

在这里插入图片描述
遇到如上错误找到如下解决方法:
在这里插入图片描述
大概就是sklearn 1.4版更新
我们将n_init= 'auto’输入即可
结果如下在这里插入图片描述

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇
下一篇>>