集群合并阈值

时间:2013-01-24 19:16:23

标签: cluster-analysis threshold kernel-density

我正在使用Mean shift,此过程计算数据集中每个点收敛的位置。我还可以计算2个不同点收敛的坐标之间的欧氏距离,但是我必须给出一个阈值,比如说,如果(距离<阈值),那么这些点属于同一个集群,我可以将它们合并。

如何找到用作阈值的正确值? (我可以使用每个值,从中取决于结果,但我需要最佳值)

1 个答案:

答案 0 :(得分:0)

我已经多次实施了均值漂移聚类并遇到了同样的问题。根据您愿意为每个点移动的迭代次数,或者您的终止条件是什么,通常会有一些后处理步骤,您必须将移位的点分组到群集中。 理论上转移到相同模式的点不需要实际上直接在彼此顶部。

我认为最好和最常用的方法是使用基于内核带宽的阈值,如评论中所建议的那样。在过去,我执行此后处理的代码通常看起来像这样:

threshold = 0.5 * kernel_bandwidth
clusters = []
for p in shifted_points:
    cluster = findExistingClusterWithinThresholdOfPoint(p, clusters, threshold)
    if cluster == null:
        // create new cluster with p as its first point
        newCluster = [p]
        clusters.add(newCluster)
    else:
        // add p to cluster
        cluster.add(p)

对于findExistingClusterWithinThresholdOfPoint函数,我通常使用p与当前定义的每个群集的最小距离。

这看起来效果很好。希望这会有所帮助。

相关问题