ahead
is a package for univariate and multivariate time series forecasting, with uncertainty quantification (R and Python).
The model used in this demo is stats::loess
(Local Polynomial Regression Fitting),
adapted to univariate forecasting in ahead::loessf
.
Currently for this model (as of 2023-08-28), for uncertainty quantification, options are:
Please remember that in real life, this model's hyperparameters will have to be tuned.
knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
ahead
Here's how to install the R version of the package:
1st method: from R-universe
In R console:
``` r options(repos = c( techtonique = 'https://techtonique.r-universe.dev', CRAN = 'https://cloud.r-project.org'))
install.packages("ahead") ```
2nd method: from Github
In R console:
r
devtools::install_github("Techtonique/ahead")
Or
r
remotes::install_github("Techtonique/ahead")
And here are the packages that will be used in this vignette:
library(ahead) library(fpp) library(datasets) library(randomForest) library(e1071)
library(ahead) library(datasets)
ahead::loessf
on Nile datasetplot(loessf(Nile, h=20, type_pi = "bootstrap", type_aggregation = "mean", level=95, B=10))
plot(loessf(Nile, h=20, type_pi = "bootstrap", type_aggregation = "median", level=95, B=10))
plot(loessf(Nile, h=20, type_pi = "blockbootstrap", type_aggregation = "mean", level=95, B=10))
plot(loessf(Nile, h=20, type_pi = "blockbootstrap", type_aggregation = "median", level=95, B=10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.