ISCC - Minhash#
alg_minhash(features)
#
Calculate a 64 dimensional minhash integer vector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
features |
List[int]
|
List of integer features |
required |
Returns:
Type | Description |
---|---|
List[int]
|
Minhash vector |
Source code in iscc_core\minhash.py
alg_minhash_64(features)
#
Create 64-bit minimum hash digest.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
features |
List[int]
|
List of integer features |
required |
Returns:
Type | Description |
---|---|
bytes
|
64-bit binary from the least significant bits of the minhash values |
Source code in iscc_core\minhash.py
alg_minhash_256(features)
#
Create 256-bit minimum hash digest.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
features |
List[int]
|
List of integer features |
required |
Returns:
Type | Description |
---|---|
bytes
|
256-bit binary from the least significant bits of the minhash values |
Source code in iscc_core\minhash.py
alg_minhash_compress(mhash, lsb = 4)
#
Compress minhash vector to byte hash-digest.
Concatenates lsb
number of least-significant bits from each integer in mhash
.
For example an mhash
with 64 integers and lsb=4
will produce a 256-bit summary
of the minhash vector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mhash |
List[int]
|
List of minhash integer features |
required |
lsb |
int
|
Number of the least significant bits to retain |
4
|
Returns:
Type | Description |
---|---|
bytes
|
256-bit binary from the least significant bits of the minhash values |