View source: R/pairwise_intersection.R
pairwise_intersection | R Documentation |
Calculates the pairwise probability of intersection. Also may be referred to as the joint probability, dot product similarity, or Russell Rao.
pairwise_intersection(data, cols, case_weights)
pairwise_joint(data, cols, case_weights)
pairwise_dot_product(data, cols, case_weights)
pairwise_russell_rao(data, cols, case_weights)
data |
A data frame. |
cols |
Columns to analyze. |
case_weights |
An optional column of case weights. |
Metric: Probability/Similarity
Symmetrical: Yes
Upper Limit: 1
Lower Limit: 0
B | |||
1 | 0 | ||
A | 1 | a | b |
0 | c | d | |
Probability = a/N
A matrix.
res <- pairwise_intersection(
data = FoodSample,
cols = Bisque:Turkey
)
print(res)
tidy(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.