-
Notifications
You must be signed in to change notification settings - Fork 16
A Python library that implements locality-sensitive hashing for the near(est) neighbors problem.
bjzu/LocalitySensitiveHashing
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
==============================================================================
Locality-Sensitive Hashing for the Near(est) Neighbors Problem
==============================================================================
This small library implements LSH-kNN for the masses in Python.
It runs on all your cores. Perfect for your medium-data needs.
==============================================================================
Here's how one might use it:
>>> import lsh
>>> # data is a dictionary of indices.
>>> # number_of_expected_features is an integer expressing how many
>>> # features you, um, expect.
>>> this_lsh = lsh.LSH(d=number_of_expected_features)
>>> this_lsh.bin_data(data)
>>> # Let's find the near neighbors for some query_pt.
>>> query_pt = data[some_index]
>>> near_neighbors = lsh.near_neighbors(some_index, query_pt)
>>> # Bam! You have your near neighbors.
==============================================================================About
A Python library that implements locality-sensitive hashing for the near(est) neighbors problem.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published