class 中的样本方向,Python 中的 k-means 聚类
Sample orientation in the class, clustered by k-means in Python
我有一些聚类 classes 和一个带有预测的样本。现在,我想知道样本的 "orientation",它从 0 到 1 不等,其中 0 - 在 class 中心,1 - 在 class 边界(半径) .我想,这将是
orientation=dist_from_center/class_radius
所以,我很难找到 class 半径。第一个想法是获取从中心到最远样本的距离,但我想使用 smth more 'academic' 和 less custom
您为我们定义方向的方式似乎是您的正确想法。如果您使用离中心最远的距离作为分母,那么您将得到 0 作为最小值(簇中心)和 1 作为最大值(最远距离)和两者之间的线性距离。
我有一些聚类 classes 和一个带有预测的样本。现在,我想知道样本的 "orientation",它从 0 到 1 不等,其中 0 - 在 class 中心,1 - 在 class 边界(半径) .我想,这将是
orientation=dist_from_center/class_radius
所以,我很难找到 class 半径。第一个想法是获取从中心到最远样本的距离,但我想使用 smth more 'academic' 和 less custom
您为我们定义方向的方式似乎是您的正确想法。如果您使用离中心最远的距离作为分母,那么您将得到 0 作为最小值(簇中心)和 1 作为最大值(最远距离)和两者之间的线性距离。