gluonts.torch.model.d_linear.module module#
- class gluonts.torch.model.d_linear.module.DLinearModel(prediction_length: int, context_length: int, hidden_dimension: int, distr_output=gluonts.torch.distributions.studentT.StudentTOutput(beta=0.0), kernel_size: int = 25, scaling: Optional[str] = 'mean')[source]#
Bases:
Module
Module implementing a feed-forward model form the paper https://arxiv.org/pdf/2205.13504.pdf extended for probabilistic forecasting.
- Parameters:
prediction_length – Number of time points to predict.
context_length – Number of time steps prior to prediction time that the model.
hidden_dimension – Size of last hidden layers in the feed-forward network.
distr_output – Distribution to use to evaluate observations and sample predictions.
- forward(past_target: Tensor, past_observed_values: Tensor) Tuple[Tuple[Tensor, ...], Tensor, Tensor] [source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class gluonts.torch.model.d_linear.module.MovingAvg(kernel_size, stride)[source]#
Bases:
Module
Moving average block to highlight the trend of time series.
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class gluonts.torch.model.d_linear.module.SeriesDecomp(kernel_size)[source]#
Bases:
Module
Series decomposition block.
- forward(x)[source]#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.