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:
ModuleModule 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
Moduleinstance 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:
ModuleMoving 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
Moduleinstance 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:
ModuleSeries 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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.