Metadata-Version: 2.1
Name: HashedKNN
Version: 1.0.0
Summary: Locality-sensitive hashing to implement K nearesr neighbors fast.
Home-page: https://github.com/MKSHLabs/HashedKNN
Author: Ashish Kashav
Author-email: ashish.kashav1@gmail.com
License: MIT
Keywords: Activity of Daily Living
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Description-Content-Type: text/markdown
Requires-Dist: numpy
Requires-Dist: tqdm

# HasedKNN
LSH based KNN inspired from LSH Attention (Reformer: The Efficient Transformer)

## Last Stable Release
```sh
$ pip install hashedknn
```


## Usage example
From a jupyter notebook run
```python

import HashedKNN

# Fetch dataset
from sklearn.datasets import fetch_openml
X, y = fetch_openml('mnist_784', version=1, return_X_y=True)

# Run LSH based KNN
knn = HasedKNN(bucket_size=8, number_of_universes=20)

# Fit
knn.fit(X)

# Find ID's of 10 nearest neighbors
id = knn.find(vectorIdx=10, corpus=X, k=10)
```


