Kmeans错误py:870: FutureWarning: The default value of `n

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’输入即可

结果如下在这里插入图片描述

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://net2asp.com/b7564f1aef.html