Skip to main content

variation_of_information_score

Function variation_of_information_score 

Source
pub fn variation_of_information_score(
    x: &[f64],
    y: &[f64],
    n_bins: Option<usize>,
    normalize: bool,
) -> CodependenceResult<f64>
Expand description

Variation of information VI[X;Y] = H[X] + H[Y] - 2 I[X;Y] of x and y (Meilă, 2007), estimated from equal-width histograms.

A true metric: the uncertainty left in each variable once the other is known. With normalize = true it is divided by the joint entropy H[X,Y] and lies in [0, 1], with 0 meaning each variable determines the other. n_bins = None uses get_optimal_number_of_bins with the sample correlation.

§Errors