lrf

Function lrf 

Source
pub fn lrf<T: ToPrimitive>(
    data: &[T],
    window: usize,
) -> impl Iterator<Item = f64> + '_
Expand description

Linear Regression Forecast (aka Time Series Forecast aka Least Squares Moving Average)

A type of moving average that incorporates the slope and intercept of a linear regression line to make predictions.

§Sources

[1]

§Examples

use traquer::smooth;

smooth::lrf(&[1.0,2.0,3.0,4.0,5.0], 3).collect::<Vec<f64>>();