There is a newer version of this record available.

Software Open Access

ekzhu/datasketch: hashfunc to replace hashobj

Eric Zhu; Vadim Markovtsev; aastafiev; ae-foster; fpug; Wojciech Łukasiewicz; Titusz; Spandan Thakur; Kevin Mann

Now support hashfunc parameter for MinHash and HyperLogLog. The old parameter hashobj is removed.

# Let's use MurmurHash3.
import mmh3

# We need to define a new hash function that outputs an integer that
# can be encoded in 32 bits.
def _hash_func(d):
    return mmh3.hash32(d)

# Use this function in MinHash constructor.
m = MinHash(hashfunc=_hash_func)

Files (2.5 MB)
Name Size
ekzhu/datasketch-v1.4.0.zip
md5:4c4b76e205742a3590df4291d6bc520d
2.5 MB Download
1,077
214
views
downloads
All versions This version
Views 1,07765
Downloads 21413
Data volume 257.6 MB33.1 MB
Unique views 95651
Unique downloads 1017

Share

Cite as