code: def __init__(
      self,
      degree_of_polynomial: int,
      backcast_size: int,
      forecast_size: int,
      out_features: int = 1,
  ):
      super().__init__()
      self.out_features = out_features
      polynomial_size = degree_of_polynomial + 1
      self.backcast_basis = nn.Parameter(
          torch.tensor(
              np.concatenate(
                  [
                      np.power(
                          np.arange(backcast_size, dtype=float)
                          / backcast_size,
                          i,
                      )[None, :]
                      for i in range(polynomial_size)
                  ]
              ),
              dtype=torch.float32,
          ),
          requires_grad=False,
      )
      self.forecast_basis = nn.Parameter(
          torch.tensor(
              np.concatenate(
                  [
                      np.power(
                          np.arange(forecast_size, dtype=float)
                          / forecast_size,
                          i,
                      )[None, :]
                      for i in range(polynomial_size)
                  ]
              ),
              dtype=torch.float32,
          ),
          requires_grad=False,
      )
  
imports: from typing import Tuple, Optional
  import numpy
  import torch
  import torch.nn
  from ..losses.pytorch import MAE
  from ..common._base_windows import BaseWindows
label_desc: Use image node_id 1 to create a new TrendBasis object from inherited base classes: nn with example: obj = TrendBasis(degree_of_polynomial, backcast_size, forecast_size, out_features)