Skip to content

A Python library that implements locality-sensitive hashing for the near(est) neighbors problem.

Notifications You must be signed in to change notification settings

bjzu/LocalitySensitiveHashing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 

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

No packages published