nabled 0.0.8

A linear algebra library written in Rust with an ndarray-first architecture.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use nabled::ml::regression;
use ndarray::{Array1, Array2};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let x = Array2::from_shape_vec((5, 1), vec![1.0, 2.0, 3.0, 4.0, 5.0])?;
    let y = Array1::from_vec(vec![2.0, 4.0, 6.0, 8.0, 10.0]);

    let result = regression::linear_regression(&x, &y, true)?;
    println!("coefficients: {:?}", result.coefficients);

    Ok(())
}