Skip to content

StefanoDamato/fable.intermittent

Repository files navigation

fable.intermittent

R-CMD-check 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.
EMPDISTR() 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.
STATICDISTR() 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 distribution used by the methods, there is the Tweedie distribution, for which fable.intermittent provides a novel implementation. It can be used in the following ways:

  • using the R stats package syntax: dtweedie(), ptweedie(), qtweedie(), and rtweedie().
  • using the distributional object dist_tweedie() and all its methods, such as density(), CDF(), quantile(), generate(), and others.

Finally, the package releases two data sets in the tsibble format: auto and raf.

News

💥 [2026-TO-DO] fable.intermittent v0.1.0: first release.

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.

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors