Berserk Docs
Scalar FunctionsDynamic / JSON Functions

minhash_similarity

Returns the fraction of positions at which two MinHash signatures agree: an estimate of the Jaccard similarity of the sets they came from.

The arguments are positional signatures, not sets, so jaccard_index() is not a substitute. Signatures of different lengths, empty or null signatures, and ones with a position that is not an int or long return null.

Syntax

minhash_similarity(signature1, signature2)

Parameters

Prop

Type

Returns: real

Examples

Example 1

print minhash_similarity(minhash("the quick brown fox", 64), minhash("the quick brown cat", 64))
print_0 (real)
0.59375

On this page