compute
A crate for statistical computing.
To use this in your Rust program, add the following to your Cargo.toml
file:
// Cargo.toml
compute = "0.1"
Statistical distributions
use *;
let beta = new;
let betadata: = b.sample_vec; // vector of 1000 variates
println!;
println!;
println!; // probability distribution function
let binom = new;
println!; // sample single value
println!; // probability mass function
Regression
use *;
let x = vec!;
let y = vec!;
let mut clf = new; // degree 1 (i.e. linear regressor)
clf.fit; // linear least squares fitting
println!; // get model coefficients
Time Series Models
use *;
let x = vec!;
let mut ar = AR new; // AR(1) model
ar.fit; // fit model with Yule-Walker equations
println!; // get model coefficients
println!; // forecast 5 steps ahead
Numerical integration
use *;
let f = ;
println!; // trapezoid integration with 100 segments
println!; // gaussian quadrature integration
println!; // romberg integration with tolerance and max steps
Data summary functions
use *;
let x = vec!;
let y = vec!;
println!;
println!;
println!;
println!;
println!;
Linear algebra functions
use *;
let x = vec!;
let y = vec!;
println!; // invert matrix
println!; // x transpose times x
println!; // dot product of x and y (two vectors)
println!; // matrix multiply, transposing y
Mathematical and statistical functions
use *;
println!;
println!