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’输入即可
结果如下

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
青葱年少的头像青葱年少普通用户
上一篇 2023年7月12日
下一篇 2023年7月12日

相关推荐