K 平均聚类中心更新的计算问题
作者: FUTUREEEEEE创建于 2021年11月18日更新于 2023年9月15日
Hello, author! Thank you very much for your open source machine learning code, it has been very helpful. I would like to ask you: In the above function, why do you use center = center / Xarray.shape[0] (the sum of the cluster divided by the total number of samples), instead of center = center / len(group), that is, the average of the center point of each cluster should be the sum of the cluster divided by the number of the cluster? The code location is as follows. Thank you very much!
内容来源: Dod-o/Statistical-Learning-Method_Code