View source: R/calc_assoc_metrics.R
calculate_metrics | R Documentation |
Helper function that computes various association metrics for bigrams based on their probability distributions. Supports PMI (Pointwise Mutual Information), Dice's Coefficient, and G-score calculations.
calculate_metrics(bigram_probs, association)
bigram_probs |
A data frame containing bigram probability data with columns:
|
association |
Character vector specifying which metrics to calculate |
A data frame containing the original probability columns plus requested association metrics:
pmi: Pointwise Mutual Information
dice_coeff: Dice's Coefficient
g_score: G-score
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.