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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file FlyHash-1.1.1.tar.gz.

File metadata

  • Download URL: FlyHash-1.1.1.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for FlyHash-1.1.1.tar.gz
Algorithm Hash digest
SHA256 70fa57709e3fbd5dec6eedacb9f112a5798c2b6a68b856e31af0bf678c306816
MD5 7e5b6431239c603d754171d002c7967e
BLAKE2b-256 72d45b80050f64e126822f70ee0b9c2979216d7b83cdf57a2e2c274f9435671d

See more details on using hashes here.

File details

Details for the file FlyHash-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: FlyHash-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for FlyHash-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 12d6d91cb3b55718593c49025513bf1ece1d4d9d73c84c9949457cb16e64f854
MD5 db7c64468871b67b46e5d96176b6febf
BLAKE2b-256 65bae490949d4c577fed6d23004405de94aebe7c94f70b7da4775d828794408f

See more details on using hashes here.

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