convergencewarning专题

pycharm-ConvergenceWarning: Number of distinct clusters (19) found smaller than n_clusters (20).

ConvergenceWarning: Number of distinct clusters (19) found smaller than n_clusters (20). pycharm利用Kmeans做文本聚类,选择最优k值时,飘红 可以发现,从20开始就飘红了,追溯代码,可能是聚类中心点个数设置太大了,n_features达到20时error已经等于0,后面的也就无需设置太多