GluonTS N-BEATS ENSEMBLE Modeling Function (Bridge)
nbeats_ensemble_fit_impl(
x,
y,
freq,
prediction_length,
id,
epochs = 5,
batch_size = 32,
num_batches_per_epoch = 50,
learning_rate = 0.001,
learning_rate_decay_factor = 0.5,
patience = 10,
minimum_learning_rate = 5e-05,
clip_gradient = 10,
weight_decay = 1e-08,
init = "xavier",
ctx = NULL,
hybridize = TRUE,
meta_context_length = prediction_length * c(2, 4),
meta_loss_function = list("sMAPE"),
meta_bagging_size = 3,
num_stacks = 30,
num_blocks = list(1),
widths = list(512),
sharing = list(FALSE),
expansion_coefficient_lengths = list(32),
stack_types = list("G")
)
A dataframe of xreg (exogenous regressors)
A numeric vector of values to fit
A pandas
timeseries frequency such as "5min" for 5-minutes or "D" for daily.
Refer to Pandas Offset Aliases.
Numeric value indicating the length of the prediction horizon
A quoted column name that tracks the GluonTS FieldName "item_id"
Number of epochs that the network will train (default: 5).
Number of examples in each batch (default: 32).
Number of batches at each epoch (default: 50).
Initial learning rate (default: 10-3 ).
Factor (between 0 and 1) by which to decrease the learning rate (default: 0.5).
The patience to observe before reducing the learning rate, nonnegative integer (default: 10).
Lower bound for the learning rate (default: 5x10-5 ).
Maximum value of gradient. The gradient is clipped if it is too large (default: 10).
The weight decay (or L2 regularization) coefficient. Modifies objective by adding a penalty for having large weights (default 10-8 ).
Initializer of the weights of the network (default: <U+201C>xavier<U+201D>).
The mxnet CPU/GPU context. Refer to using CPU/GPU in the mxnet documentation. (default: NULL, uses CPU)
Increases efficiency by using symbolic programming. (default: TRUE)
The different 'context_length' (also known as 'lookback period') to use for training the models. The 'context_length' is the number of time units that condition the predictions. Default and recommended value: list(multiplier * prediction_length for multiplier in range(2, 7))
The different 'loss_function' (also known as metric) to use for training the models. Unlike other models in GluonTS this network does not use a distribution. Default and recommended value: list("sMAPE", "MASE", "MAPE")
The number of models that share the parameter combination of 'context_length' and 'loss_function'. Each of these models gets a different initialization random initialization. Default (3). Recommended value: 10
The number of stacks the network should contain. Default and recommended value for generic mode: 30 Recommended value for interpretable mode: 2
The number of blocks per stack. A list of ints of length 1 or 'num_stacks'. Default and recommended value for generic mode: 1. Recommended value for interpretable mode: 3.
Widths of the fully connected layers with ReLu activation in the blocks. A list of ints of length 1 or 'num_stacks'. Default and recommended value for generic mode: list(512)
Recommended value for interpretable mode: list(256, 2048)
Whether the weights are shared with the other blocks per stack. A list of ints of length 1 or 'num_stacks'. Default and recommended value for generic mode: list(FALSE)
Recommended value for interpretable mode: list(TRUE)
If the type is "G" (generic), then the length of the expansion coefficient. If type is "T" (trend), then it corresponds to the degree of the polynomial. If the type is "S" (seasonal) then its not used. A list of ints of length 1 or 'num_stacks'. Default value for generic mode: list(32)
Recommended value for interpretable mode: list(3)
One of the following values: "G" (generic), "S" (seasonal) or "T" (trend). A list of strings of length 1 or 'num_stacks'. Default and recommended value for generic mode: list("G")
Recommended value for interpretable mode: list("T","S")
The total number of models used is:
meta_context_length x meta_loss_function x meta_bagging_size