gluonts.model.gpvar package

class gluonts.model.gpvar.GPVAREstimator(freq: str, prediction_length: int, target_dim: int, trainer: =, metric="score", num_models=1), batch_size=32, clip_gradient=10.0, ctx=None, epochs=100, hybridize=True, init="xavier", learning_rate=0.001, learning_rate_decay_factor=0.5, minimum_learning_rate=5e-05, num_batches_per_epoch=50, patience=10, weight_decay=1e-08), context_length: Optional[int] = None, num_layers: int = 2, num_cells: int = 40, cell_type: str = 'lstm', num_parallel_samples: int = 100, dropout_rate: float = 0.1, target_dim_sample: Optional[int] = None, distr_output: Optional[] = None, rank: Optional[int] = 2, scaling: bool = True, pick_incomplete: bool = False, lags_seq: Optional[List[int]] = None, shuffle_target_dim: bool = True, time_features: Optional[List[gluonts.time_feature._base.TimeFeature]] = None, conditioning_length: int = 100, use_marginal_transformation: bool = False)[source]

Bases: gluonts.model.estimator.GluonEstimator

Constructs a GPVAR estimator.

These models have been described as GP-Copula in this paper:

Note that this implementation will change over time and we further work on this method. To replicate the results of the paper, please refer to our (frozen) implementation here:

  • freq – Frequency of the data to train on and predict

  • prediction_length – Length of the prediction horizon

  • target_dim – Dimensionality of the input dataset

  • trainer – Trainer object to be used (default: Trainer())

  • context_length – Number of steps to unroll the RNN for before computing predictions (default: None, in which case context_length = prediction_length)

  • num_layers – Number of RNN layers (default: 2)

  • num_cells – Number of RNN cells for each layer (default: 40)

  • cell_type – Type of recurrent cells to use (available: ‘lstm’ or ‘gru’; default: ‘lstm’)

  • 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)

  • dropout_rate – Dropout regularization parameter (default: 0.1)

  • target_dim_sample – Number of dimensions to sample for the GP model

  • distr_output – Distribution to use to evaluate observations and sample predictions (default: LowrankGPOutput with dim=target_dim and rank=5). Note that target dim of the DistributionOutput and the estimator constructor call need to match. Also note that the rank in this constructor is meaningless if the DistributionOutput is constructed outside of this class.

  • rank – Rank for the LowrankGPOutput. (default: 2)

  • scaling – Whether to automatically scale the target values (default: true)

  • pick_incomplete – Whether training examples can be sampled with only a part of past_length time-units

  • lags_seq – Indices of the lagged target values to use as inputs of the RNN (default: None, in which case these are automatically determined based on freq)

  • shuffle_target_dim – Shuffle the dimensions before sampling.

  • time_features – Time features to use as inputs of the RNN (default: None, in which case these are automatically determined based on freq)

  • conditioning_length – Set maximum length for conditioning the marginal transformation

  • use_marginal_transformation – Whether marginal (CDFtoGaussianTransform) transformation is used by the model

create_predictor(transformation: gluonts.transform._base.Transformation, trained_network: mxnet.gluon.block.HybridBlock) → gluonts.model.predictor.Predictor[source]

Create and return a predictor object.


A predictor wrapping a HybridBlock used for inference.

Return type


create_training_network() → gluonts.model.gpvar._network.GPVARTrainingNetwork[source]

Create and return the network used for training (i.e., computing the loss).


The network that computes the loss given input data.

Return type


create_transformation() → gluonts.transform._base.Transformation[source]

Create and return the transformation needed for training and inference.


The transformation that will be applied entry-wise to datasets, at training and inference time.

Return type


freq = None
lead_time = None
prediction_length = None