Calculates the fuzzy Jaccard index. The "normal" Jaccard index is given by sum(A intersect B) / sum(A union B), where A and B are sets. Typically, A and B are binary outcomes, but the fuzzy version can accommodate values in [0, 1] and/or binary outcomes. The computationally efficient and equivalent method is sum(pmin(A, B)) / (sum(A) + sum(B) - sum(pmin(A, B))). If A and B and both binary, the outcome is the same as the "plain" Jaccard index.
Usage
fuzzyJaccard(a, b)
Value
Numeric in the range [0, 1].
Arguments
a, b
Vectors of binary and/or values in the range [0, 1]. The vectors must be of the same length.