Skip to main content

A novel hashing algorithm based on "A neural algorithm for a fundamental computing problem" by S. Dasgupta, C. F. Stevens, and S. Navlakha (2017)

Project description

Documentation Status Coveralls PyPI-Server Monthly Downloads Project generated with PyScaffold

FlyHash

A novel hashing algorithm based on "A neural algorithm for a fundamental computing problem" by S. Dasgupta, C. F. Stevens, and S. Navlakha (2017)

FlyHash is a LSH algorithm that maps input data to a sparse hash embedding, where the dimension of the hash embedding is much larger than the input, and keeps the locality of the input data in the hash embedding.

FlyHash is designed to be cheap to compute, yet not ganranteeing memory efficiency. It is suitable for hashing small to medium sized data ($d$ ~ 10-1000) to a large hash embedding ($m$ ~ 100-10000).

Usage

Using a large hash_dim $m=100$ for a small input_dim $d=10$:

>>> import numpy as np
>>> from flyhash import FlyHash
>>> d = 10
>>> m = 100
>>> flyhash = FlyHash(d, m)
>>> data = np.random.randn(5, d)
>>> hashed_data = flyhash(data)

For detailed usage, please refer to the documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

FlyHash-1.1.1.tar.gz (23.4 kB view hashes)

Uploaded Source

Built Distribution

FlyHash-1.1.1-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page