| ts_mv_spec | R Documentation |
Wrap a univariate forecasting model so it can be orchestrated inside a multivariate workflow.
ts_mv_spec(model, variables = NULL, lags = NULL, transforms = NULL)
model |
Base model object. It can be a sliding-window regressor such as
|
variables |
Optional character vector. Variables used as predictors for this submodel. When omitted, defaults depend on the context: target model uses all variables, auxiliary models use their own variable. |
lags |
Optional named list with one integer vector per variable. When
omitted, each variable uses all lags from |
transforms |
Optional named list of raw-series transformations applied per variable before the multivariate windows are built. Each entry can be a single transform object or a list of transforms. These transformations act as variable-specific feature engineering and are orchestrated by the multivariate wrapper. |
ts_mv_spec() is the object-oriented contract that describes how one
variable-specific predictive pipeline should be assembled inside
ts_regsw_mv().
Each specification can declare:
model: the learner responsible for the variable
variables: which synchronized series are allowed as inputs to this
learner
lags: which lag positions are extracted from each variable block
transforms: optional raw-series transformations applied per variable
before the multivariate windows are built
This design lets different variables use different forecasting strategies while preserving a single orchestration contract. For example:
the target y may use ts_lstm(ts_norm_an(), ...)
x1 may use ts_mlp(ts_norm_diff(), ...)
x2 may use ts_rf(ts_norm_gminmax(), ...) plus a smoothing filter
deterministic auxiliary variables may use ts_deterministic(),
ts_periodic(), or ts_persist()
In other words, the multivariate layer coordinates the pipelines, but the behavior of each variable still lives inside its own object.
A ts_mv_spec object.
spec_y <- ts_mv_spec(ts_mlp(ts_norm_gminmax()), variables = c("y", "x1"))
spec_x1 <- ts_mv_spec(ts_deterministic("periodic", period = 7), variables = "x1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.