TrendBasis¶
- class TrendBasis(degree: int, backcast_size: int, forecast_size: int)[source]¶
Bases:
torch.nn.modules.module.Module
Polynomial trend basis function.
Initialize trend basis function.
- Parameters
degree (int) – Degree of polynomial for trend modeling.
backcast_size (int) – Number of backcast values.
forecast_size (int) – Number of forecast values.
Methods
forward
(theta)Forward pass.
Attributes
- forward(theta: torch.Tensor) Tuple[torch.Tensor, torch.Tensor] [source]¶
Forward pass.
- Parameters
theta (torch.Tensor) – Basis function parameters.
- Returns
Tuple with backcast and forecast.
- Return type
Tuple[torch.Tensor, torch.Tensor]