Project: datasketch

Probabilistic data structures for processing and searching very large datasets

Project Details

Latest version
1.6.4
Home Page
https://ekzhu.github.io/datasketch
PyPI Page
https://pypi.org/project/datasketch/

Project Popularity

PageRank
0.0021111762655244485
Number of downloads
1226492

datasketch: Big Data Looks Small

.. image:: https://github.com/ekzhu/datasketch/workflows/Python%20package/badge.svg :target: https://github.com/ekzhu/datasketch/actions

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.290602.svg :target: https://doi.org/10.5281/zenodo.290602

datasketch gives you probabilistic data structures that can process and search very large amount of data super fast, with little loss of accuracy.

This package contains the following data sketches:

+-------------------------+-----------------------------------------------+ | Data Sketch | Usage | +=========================+===============================================+ | MinHash_ | estimate Jaccard similarity and cardinality | +-------------------------+-----------------------------------------------+ | Weighted MinHash_ | estimate weighted Jaccard similarity | +-------------------------+-----------------------------------------------+ | HyperLogLog_ | estimate cardinality | +-------------------------+-----------------------------------------------+ | HyperLogLog++_ | estimate cardinality | +-------------------------+-----------------------------------------------+

The following indexes for data sketches are provided to support sub-linear query time:

+---------------------------+-----------------------------+------------------------+ | Index | For Data Sketch | Supported Query Type | +===========================+=============================+========================+ | MinHash LSH_ | MinHash, Weighted MinHash | Jaccard Threshold | +---------------------------+-----------------------------+------------------------+ | MinHash LSH Forest_ | MinHash, Weighted MinHash | Jaccard Top-K | +---------------------------+-----------------------------+------------------------+ | MinHash LSH Ensemble_ | MinHash | Containment Threshold | +---------------------------+-----------------------------+------------------------+ | HNSW_ | Any | Custom Metric Top-K | +---------------------------+-----------------------------+------------------------+

datasketch must be used with Python 3.7 or above, NumPy 1.11 or above, and Scipy.

Note that MinHash LSH_ and MinHash LSH Ensemble_ also support Redis and Cassandra storage layer (see MinHash LSH at Scale_).

Install

To install datasketch using pip:

::

pip install datasketch

This will also install NumPy as dependency.

To install with Redis dependency:

::

pip install datasketch[redis]

To install with Cassandra dependency:

::

pip install datasketch[cassandra]

.. _MinHash: https://ekzhu.github.io/datasketch/minhash.html .. _Weighted MinHash: https://ekzhu.github.io/datasketch/weightedminhash.html .. _HyperLogLog: https://ekzhu.github.io/datasketch/hyperloglog.html .. _HyperLogLog++: https://ekzhu.github.io/datasketch/hyperloglog.html#hyperloglog-plusplus .. _MinHash LSH: https://ekzhu.github.io/datasketch/lsh.html .. _MinHash LSH Forest: https://ekzhu.github.io/datasketch/lshforest.html .. _MinHash LSH Ensemble: https://ekzhu.github.io/datasketch/lshensemble.html .. _Minhash LSH at Scale: http://ekzhu.github.io/datasketch/lsh.html#minhash-lsh-at-scale .. _HNSW: https://ekzhu.github.io/datasketch/documentation.html#hnsw