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
CodependenceError::InputLengthMismatchifxandydiffer in length.CodependenceError::InputTooShortif they are empty, or (withn_bins = None) have fewer than two observations.CodependenceError::InvalidBinsifn_binsisSome(0)or the bin rule fails.CodependenceError::ZeroVarianceifn_bins = Noneand a series is constant, ornormalizeis true and the joint entropy is zero.