Skip to main content

pearson

Function pearson 

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

Pearson product-moment correlation of two equally long vectors.

Returns 0 for the empty case and for a constant vector (zero variance), where the coefficient is undefined; keeping the metric finite lets the daemon compare the tree against the EMA predictor without special cases.