GluonTS DeepAR (Torch) Modeling Function (Bridge)
Source:R/parsnip-deepar.R
deepar_torch_fit_impl.Rd
GluonTS DeepAR (Torch) Modeling Function (Bridge)
Usage
deepar_torch_fit_impl(
x,
y,
freq,
prediction_length,
id,
epochs = 5,
context_length = NULL,
num_layers = 2,
hidden_size = 40,
num_cells = 40,
dropout_rate = 0.1,
num_feat_dynamic_real = 0,
num_feat_static_cat = 0,
num_feat_static_real = 0,
cardinality = NULL,
embedding_dimension = NULL,
distr_output = "default",
scaling = TRUE,
lags_seq = NULL,
time_features = NULL,
num_parallel_samples = 100,
batch_size = 32,
scale_by_id = FALSE,
...
)
Arguments
- x
A dataframe of xreg (exogenous regressors)
- y
A numeric vector of values to fit
- freq
A
pandas
timeseries frequency such as "5min" for 5-minutes or "D" for daily. Refer to Pandas Offset Aliases.- 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).
- context_length
Number of steps to unroll the RNN for before computing predictions (default: NULL, in which case context_length = prediction_length)
- num_layers
Number of RNN layers (default: 2)
- hidden_size
Hidden units
- num_cells
Number of RNN cells for each layer (default: 40)
- dropout_rate
Dropout regularization parameter (default: 0.1)
- num_feat_dynamic_real
Number of dynamic numeric features
- num_feat_static_cat
Number of static categorical features
- num_feat_static_real
Number of static numeric features
- cardinality
Number of values of each categorical feature. This must be set if
use_feat_static_cat
== TRUE (default: NULL)- embedding_dimension
Dimension of the embeddings for categorical features (default:
min(50, (cat+1)//2)
for cat in cardinality)- distr_output
Distribution to use to evaluate observations and sample predictions (default: StudentTOutput())
- scaling
Whether to automatically scale the target values (default: TRUE)
- lags_seq
Indices of the lagged target values to use as inputs of the RNN (default: NULL, in which case these are automatically determined based on freq)
- time_features
Time features to use as inputs of the RNN (default: None, in which case these are automatically determined based on freq)
- num_parallel_samples
Number of evaluation samples per time series to increase parallelism during inference. This is a model optimization that does not affect the accuracy (default: 100)
- batch_size
Number of examples in each batch (default: 32).
- scale_by_id
Scales numeric data by
id
group using mean = 0, standard deviation = 1 transformation. (default: FALSE)- ...
Parameters passed to
pytorch_lightning.trainer.Trainer()