pixelogik / NearPy

Python framework for fast (approximated) nearest neighbour search in large, high-dimensional data sets using different locality-sensitive hashes.
MIT License
759 stars 152 forks source link

retrieving permuted indexes #82

Open rajekta opened 5 years ago

rajekta commented 5 years ago

I want to store and retrieve the indexes formed after permutation. How can I do that. Please Help.

mkoralew commented 5 years ago

@rajekta - I think you can easilly obtain it using labels:

engine.store_vector(np.array(x_item), data=str(index))

Then looking for similar vectors will be

indexes = [int(float(item[1])) for item in self.engine.neighbours(user)]