Description Usage Arguments Details
View source: R/parsnip-nbeats.R
GluonTS N-BEATS ENSEMBLE Modeling Function (Bridge)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 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")
)
|
x |
A dataframe of xreg (exogenous regressors) |
y |
A numeric vector of values to fit |
freq |
A |
prediction_length |
Numeric value indicating the length of the prediction horizon |
id |
A quoted column name that tracks the GluonTS FieldName "item_id" |
epochs |
Number of epochs that the network will train (default: 5). |
batch_size |
Number of examples in each batch (default: 32). |
num_batches_per_epoch |
Number of batches at each epoch (default: 50). |
learning_rate |
Initial learning rate (default: 10-3 ). |
learning_rate_decay_factor |
Factor (between 0 and 1) by which to decrease the learning rate (default: 0.5). |
patience |
The patience to observe before reducing the learning rate, nonnegative integer (default: 10). |
minimum_learning_rate |
Lower bound for the learning rate (default: 5x10-5 ). |
clip_gradient |
Maximum value of gradient. The gradient is clipped if it is too large (default: 10). |
weight_decay |
The weight decay (or L2 regularization) coefficient. Modifies objective by adding a penalty for having large weights (default 10-8 ). |
init |
Initializer of the weights of the network (default: “xavier”). |
ctx |
The mxnet CPU/GPU context. Refer to using CPU/GPU in the mxnet documentation. (default: NULL, uses CPU) |
hybridize |
Increases efficiency by using symbolic programming. (default: TRUE) |
meta_context_length |
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: |
meta_loss_function |
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: |
meta_bagging_size |
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 |
num_stacks |
The number of stacks the network should contain. Default and recommended value for generic mode: 30 Recommended value for interpretable mode: 2 |
num_blocks |
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 |
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: |
sharing |
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: |
expansion_coefficient_lengths |
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: |
stack_types |
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: |
The total number of models used is:
meta_context_length x meta_loss_function x meta_bagging_size
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.