ts_darima: DARIMA

View source: R/ts_darima.R

ts_darimaR Documentation

DARIMA

Description

Create a delegated-differencing ARIMA-like regressor for the sliding-window workflow of tspredit.

Usage

ts_darima(
  preprocess = ts_norm_none(),
  input_size = NA,
  input_map = ts_lagmap(),
  intercept = TRUE
)

Arguments

preprocess

Preprocessing object. This is where delegated differencing and adaptive normalization usually live. Defaults to ts_norm_none().

input_size

Integer. Number of lagged inputs used by the model.

input_map

Lag-selection strategy object created by ts_lagmap().

intercept

Logical. Whether to include an intercept in the linear model fitted over the lagged inputs.

Details

ts_darima() is a univariate model in the ts_regsw lineage. It was designed as an elegant tspredit adaptation of classical ARIMA ideas to the supervised sliding-window world already used by the package.

The key design decision is that the integration component is delegated to the preprocessing pipeline rather than embedded inside the model itself. In practice, this means that:

  • autoregressive structure is learned directly from lagged windows

  • the d of the ARIMA logic is handled by preprocessors such as ts_norm_diff() or ts_norm_an()

  • multi-step forecasting reuses the standard recursive engine of ts_regsw

This keeps the model computationally light and naturally compatible with the target-centered multivariate workflow, where each endogenous auxiliary variable may need its own univariate learner.

ts_darima() is therefore best understood as a tspredit adaptation, inspired by ARIMA but intentionally expressed in the package's own object-oriented pipeline.

In particular, the class is meant to be read together with the package's preprocessing abstractions:

  • use ts_norm_none() when no integration-like step is desired

  • use ts_norm_diff() when first differencing should be delegated to the pipeline

  • use ts_norm_an() when an adaptive normalization view is preferred

Value

A ts_darima object inheriting from ts_regsw.

References

  • Box GEP, Jenkins GM, Reinsel GC, Ljung GM (2015). Time Series Analysis: Forecasting and Control. Wiley.

  • Hyndman RJ, Athanasopoulos G (2021). Forecasting: Principles and Practice. Third Edition. OTexts. https://otexts.com/fpp3/

  • Ogasawara E, Pereira ACM, Bernardes GFR, Brandão AAF, Albuquerque MP (2010). Adaptive normalization: A novel data normalization approach for non-stationary time series. IJCNN.

Examples

data(tsd)

ts <- ts_data(tsd$y, 8)
samp <- ts_sample(ts, test_size = 5)
io_train <- ts_projection(samp$train)
io_test <- ts_projection(samp$test)

model <- ts_darima(ts_norm_diff(), input_size = 5)
model <- daltoolbox::fit(model, io_train$input, io_train$output)

prediction <- predict(model, io_test$input[1, ], steps_ahead = 5)
prediction

tspredit documentation built on Sept. 9, 2026, 9:08 a.m.