[][src]Module peroxide::statistics::stat

Basic statistics

Statistics trait

For Vec<f64>

For Matrix

For DataFrame

extern crate peroxide;
use peroxide::*;
 
fn main() {
    #[cfg(feature = "dataframe")]
    {
        let mut m = DataFrame::with_header(vec!["x", "y"]);
        m["x"] = c!(1,2,3);
        m["y"] = c!(3,2,1);
         
        m.cov().print();
        //         c[0]    c[1]
        // r[0]  1.0000 -1.0000
        // r[1] -1.0000  1.0000
    }
}

Traits

Statistics

Statistics Trait

Functions

cor

Pearson's correlation coefficient

cov

Covariance (to Value)

lm

R like linear regression