
Time series forecasting with a fixed-width lag window
Source:R/geron_w4d_native.R
morie_geron_time_series_forecast.RdSupervised windowing (y_{t-w+1..t}) -> y_{t+1}, ridge-regularised
normal equations (min-norm solve), rolled forward recursively or
fit directly per horizon step.
Value
list with forecast, coef, intercept, train_mse, naive_mse, skill, window, horizon, estimate, n, method.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_time_series_forecast(V)
#> $forecast
#> [1] 9
#>
#> $coef
#> [1] -0.3333333 0.3333333 1.0000000
#>
#> $intercept
#> [1] 0.6666667
#>
#> $train_mse
#> [1] 1.069695e-28
#>
#> $naive_mse
#> [1] 1
#>
#> $skill
#> [1] 1
#>
#> $window
#> [1] 3
#>
#> $horizon
#> [1] 1
#>
#> $estimate
#> [1] 9
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "Recursive lag-window linear forecast (ridge normal equations)"
#>