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 = "#>"
)

Install ahead

Here's how to install the R version of the package:

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 dataset

plot(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))


Techtonique/ahead documentation built on Nov. 24, 2024, 10:33 a.m.