fable.intermittent

R-CMD-check Coverage Status Lifecycle: experimental License: LGPL (>= 3)

The package fable.intermittent implements probabilistic methods for intermittent time series in the tidyverts framework. The methods follow the fable/fabletools syntax. To fit the methods, use them as arguments of the model() function. To generate forecasts, pass the fitted models to the forecast() function, following the tidyr pipeline.

The forecasting methods are the following:

Method Description
BETANBB() Bayesian dynamic negative binomial model with a beta prior on the probability parameter.
EMPSD() Empirical resampling baseline that forecasts from the observed distribution.
GAMPOISB() Bayesian dynamic Poisson model with a gamma prior on the rate parameter.
HSPES() Exponential smoothing model with a hurdle-shifted Poisson forecast distribution.
MARWAL() ARMA model with a Markov walk on the occurrence and Gaussian forecast distribution.
NEGBINES() Exponential smoothing model with a negative binomial forecast distribution.
NNARMA() Non-negative ARMA model with a non-negative Gaussian forecast distribution.
PARAMSD() Static count-distribution model that selects among candidate distributions by AIC or BIC.
TWEES() Exponential smoothing model with a Tweedie forecast distribution.
VZ() Bootstrap method based on Croston decomposition sampling demand sizes and intervals.
WSS() Bootstrap method with sampled demand sizes and a Markov-chain for the occurrence.

The probabilistic forecasts produced by the implemented methods are distributional objects. Among the predictive distributions used by the methods, there is the Tweedie distribution, provided by the tweedieDistr package as the stats-style dtweedie(), ptweedie(), qtweedie(), rtweedie() functions).

Finally, the package releases four data sets in the tsibble format: auto, pasta, raf, and tinyM5.

Installation

You can install the stable version from CRAN:

install.packages("fable.intermittent")

You can install the development version from GitHub:

# install.packages("devtools")
devtools::install_github("StefanoDamato/fable.intermittent", build_vignettes = TRUE, dependencies = TRUE)

Usage

The package follows the standard fable workflow:

  1. Prepare data as a tsibble.
  2. Fit forecasting methods with model().
  3. Produce probabilistic forecasts with forecast().

We provide in this vignette a simple usage example; refer to the package documentation for more details on the methods.

Acknowledgements

Work on this package was supported by the Swiss National Science Foundation (SNSF) under grant number 200021_212164 (“Probabilistic Forecasting: Global Models, Gaussian Processes and Hierarchies”).

Contributors

Stefano Damato
Stefano Damato

(Maintainer)
Email
Lorenzo Zambon
Lorenzo Zambon

 
Email
Dario Azzimonti
Dario Azzimonti

 
Email

Getting help

If you encounter a bug, please file a minimal reproducible example on GitHub.