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
§Examples
use traquer::smooth;
smooth::lrf(&[1.0,2.0,3.0,4.0,5.0], 3).collect::<Vec<f64>>();