问题描述
引用E2LSH手册(关于此特定库并不重要,对于一般的NN问题,此引用应该是正确的):
Citing the E2LSH manual (it's not important that's about this specific library, this quote should be true for NN problem in general):
有人可以改一下吗?我没有使用R-near邻居方法找到最近邻居的步骤.
Could someone rephrase this please? I don't this procedure to find the nearest neighbor using the R-near neighbor approach.
推荐答案
我将提供一个示例,该示例应将其清除.假设我们的数据集仅由一个点p
组成,并且一个查询点到达q
.假设 p
与q
的距离为3.9.
I will provide an example, which should clear things up. Assume that our dataset consists of only one point, p
and a query point arrives, q
. Let's assume that the distance of p
and q
is 3,9.
现在,通过使用E2LSH ,我可以创建一个解决R最近邻问题的数据结构,即它将回答位于半径R内的是(并为我取点)如果不存在这样的问题,它将回答否.
Now, by using E2LSH, I can create a data structure that solves the R-nearest neighbor problem, i.e. it will answer yes (and fetch me the point) that lies inside a radius R. If no such point exists, it will answer no.
让我们选择从R = 1到5来构建5种这种数据结构.在我们看来,这是我们到目前为止所做的:
Let's say that I choose to build 5 data structures of that kind, starting from R = 1 to 5. In our mind, this is what we have done so far:
现在请记住,d(p,q)= 3,9,因此我们希望询问使用R = 4构建的数据结构,并为我们找到查询点q
.
So now remember, that d(p, q) = 3,9, thus we expect to ask the data structure that is built with R = 4 and find for us the query point q
.
现在,让我们假设我们不知道d(p,q),因此我们从选择的最小半径开始搜索,即1.所以,我们问,从我们的半径中是否有任何东西(等于1)数据集?不!
Now let's pretend that we do not know d(p, q), so we start searching from the smallest Radius we have picked, that's 1. So, we ask, is there anything in Radius (equal to 1) from our dataset? No!
从R = 2开始?不!从R = 3开始?不!从R = 4开始?是的,这就是q
!现在我们完成了. 4是您在问题中提到的R .
From R = 2? No!From R = 3? No!From R = 4? Yes, and that's q
! So now we are done. 4 is the R you mention in your question.
*
*
$
$
这篇关于如何通过R最近邻居解决最近邻居?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!