gluonts.torch.model.mqf2.lightning_module module#

class gluonts.torch.model.mqf2.lightning_module.MQF2MultiHorizonLightningModule(model_kwargs: dict, lr: float = 0.001, weight_decay: float = 1e-08, patience: int = 10)[source]#

Bases: LightningModule

LightningModule class for the model MQF2 proposed in the paper Multivariate Quantile Function Forecaster by Kan, Aubet, Januschowski, Park, Benidis, Ruthotto, Gasthaus.

This is the multi-horizon (multivariate in time step) variant of MQF2

This class is based on gluonts.torch.model.deepar.lightning_module.DeepARLightningModule

Parameters:
  • model_kwargs – Keyword arguments to construct the MQF2MultiHorizonModel to be trained.

  • loss – Distribution loss.

  • lr – Learning rate.

  • weight_decay – Weight decay during training.

  • patience – Patience parameter for learning rate scheduler, default: 10.

configure_optimizers()[source]#

Returns the optimizer to use.

forward(*args, **kwargs)[source]#

Same as torch.nn.Module.forward().

Parameters:
  • *args – Whatever you decide to pass into the forward method.

  • **kwargs – Keyword arguments are also possible.

Returns:

Your model’s output

training_step(batch, batch_idx: int)[source]#

Execute training step.

validation_step(batch, batch_idx: int)[source]#

Execute validation step.