The $k$-d tree is one of the oldest and most widely used data structures for nearest neighbor search. It partitions Euclidean space into axis-aligned rectangular cells. There are two standard ways to find the nearest neighbor to a query in a $k$-d tree. Defeatist search returns the closest data point in the query's cell, while comprehensive search also searches other cells as needed to guarantee it finds the nearest neighbor. Both strategies are commonly believed to perform poorly in high dimensions, but there have been few theoretical results explaining this. We prove non-asymptotic bounds on the runtime of comprehensive search and the accuracy of defeatist search. Under mild distributional assumptions, when the dimension $d$ is at least polylogarithmic in the number of data points, defeatist search is no more likely to return the nearest neighbor than random guessing, and comprehensive search visits every cell with high probability. We also show that on uniform data, with high probability, comprehensive search visits at most $2^{\mathcal{O}(d)}$ cells when each cell contains at least logarithmically many data points, and defeatist search returns the nearest neighbor when each cell additionally contains at least $2^{\mathcal{O}(d \log d)}$ data points. Finally, for arbitrary absolutely continuous distributions, we upper bound the expected distance between the query and the point returned by defeatist search.
Computing the k Nearest-Neighbors for all Vertices via Dijkstra
给出了一个有向图$G = (V,E)$,图中的$n$顶点和$m$边都是正的,边的权值是正的,图的参数是$k >0$ .我们展示了如何计算,为每个顶点$v \in V$,其$k$最近的邻居。该算法在$O( k ( n \log n + m ) )$时间内运行,并对Dijkstra的最短路径算法进行了一定程度的修改。这个结果可能是民间传说,但我们无法找到它的参考资料-因此,这张纸条。