Phi Coefficient SimilaritySource:
Measure to compare two or more sets w.r.t. their similarity.
The Phi Coefficient is defined as the Pearson correlation between the binary representation of two sets \(A\) and \(B\). The binary representation for \(A\) is a logical vector of length \(p\) with the i-th element being 1 if the corresponding element is in \(A\), and 0 otherwise.
If more than two sets are provided, the mean of all pairwise scores is calculated.
This measure is undefined if one set contains none or all possible elements.
If the measure is undefined for the input,
NaN is returned.
This can be customized by setting the field