reduced_mutual_information: Reduced Mutual Information

View source: R/corrected_mutual_information.R

reduced_mutual_informationR Documentation

Reduced Mutual Information

Description

Computes the Newman's Reduced Mutual Information (RMI) as defined in \insertCitecorrected_MI_Newman2020clustAnalytics.

Usage

reduced_mutual_information(
  c1,
  c2,
  base = 2,
  normalized = FALSE,
  method = "approximation2",
  warning = TRUE
)

Arguments

c1, c2

membership vectors

base

base of the logarithms used in the calculations. Changing it only scales the final value. By default set to e=exp(1).

normalized

If true, computes the normalized version of the corrected mutual information.

method

Can be "hybrid" (default, combines Monte Carlo with analytical formula), "monte_carlo", approximation1" (appropriate for partitions into many very small clusters), or "approximation2" (for partitions into few larger clusters).

warning

set to false to ignore the warning.

Details

The implementation is based on equations 23 (25 for the normalized case) and 29 in \insertCitecorrected_MI_Newman2020clustAnalytics. The evaluations of the \Gamma functions can get too large and cause overflow issues in the intermediate steps, so the following term of equation 29:

\frac{1}{2} \log \frac{\Gamma(\mu R) \Gamma(\nu S)} {(\Gamma(\nu)\Gamma(R))^S (\Gamma(\mu)\Gamma(S))^R }

is rewritten as

\frac{1}{2} (\log\Gamma(\mu R) + \log\Gamma(\nu S) - S\log(\Gamma(\nu) - S\log(\Gamma(R) - R\log\Gamma(\mu) - R\log\Gamma(R) )

, and then the function lgamma is used instead of gamma.

Value

The value of Newman's RMI (a scalar).

References

\insertRef

corrected_MI_Newman2020clustAnalytics


clustAnalytics documentation built on May 29, 2024, 12:18 p.m.