Python 凝聚聚类:寻找聚类中最近的点

Python Agglomerative Clustering : finding the closest points in clusters

聚类的连锁矩阵提供聚类索引和距离 对于聚类层次结构的每个步骤。 合并两个集群时,我想知道集群中哪两个点最近。我正在使用公制 "single" 即最近距离

我知道我可以通过详尽的搜索和比较轻松地做到这一点。链接后信息已经存在了吗?有没有更聪明的方法来获取这些信息?

回答您的问题:

  • 不对,联动后没有这个信息,至少根据Python官方文档是这样。

  • 最近点对问题是一个计算几何问题,可以在对数时间内通过递归除法求解conquer 算法(注意穷举搜索是二次的)。查看此维基百科 article for more information. Check also this paper by Shamos and Hoey. Note that the original formulation of the problem involves only one set of points. However, adaptation for two sets is straightforward; you might find this discussion 很有帮助。