pub fn least_square(node_x: Vec<f64>, node_y: Vec<f64>) -> Polynomial
Simple Least Square 2D
(Vec<f64>, Vec<f64>) -> Polynomial
#[macro_use] extern crate peroxide; use peroxide::fuga::*; fn main() { let a = c!(1,2,3,4,5); let b = c!(1.2, 1.8, 3.2, 3.8, 5.0); let ls = least_square(a, b); ls.print(); // 0.96x + 0.1200 }