Skip to main content

pearson

Function pearson 

Source
pub fn pearson(x: &[f64], y: &[f64]) -> Option<f64>
Expand description

Pearson product-moment correlation. None if the lengths differ or n < 2. Returns Some(0.0) when either series has zero variance (matches the historical call sites this replaced).