Function compute::statistics::covariance[][src]

pub fn covariance(x: &[f64], y: &[f64]) -> f64
Expand description

Calculates the covariance between two vectors x and y. This is a two-pass algorithm which centers the data before computing the covariance, which improves stability but does not change the result as covariance is invariant with respect to shifts.