在动态数据集上使用局部敏感哈希

Use Locality Sensitive Hashing on dynamic data set

我将 LSH 用于数据库记录,并通过它创建一个索引(不是数据库索引,一个简单的哈希图),其中类似的记录被阻塞到同一个存储桶中。数据库可能包含数百万条记录。我的问题与下面的设计有关post。

首先,我将通过执行 LSH 使用可用的数据库创建索引。但是当一条新记录插入到数据库中时,我必须将该记录也索引到索引中。我如何使用 LSH 做到这一点? LSH 可以将该记录分配到具有相似记录的桶中吗? LSH 是否支持更新数据集?

我会使用 E2LSH(由 Andoni 开发,这是一个很棒的人),它是用 C++ 编写的。在项目的站点中,提到:

Newest (not quite) LSH algorithms (2014): These algorithms achieve performance better than the classic LSH algorithms by using data-dependent hashing. They improve over classic LSH algorithms for both Hamming and Euclidean space. These algorithms are not dynamic however, in contrast to the classic LSH algorithms, which use data-independent hashing and hence allow updates to the pointset.

如果您不想使用库,但出于某种原因想开发自己的库,我建议您先研究 manual