class_docstr: Class implementing PolynomialFeatures operators in PyTorch.
  
  # TODO extend this class to support higher orders
code: def __init__(
      self,
      operator,
      n_features,
      degree,
      interaction_only,
      include_bias,
      device,
  ):
      super(PolynomialFeatures, self).__init__(operator)
      self.transformer = True
  
      self.n_features = n_features
      self.interaction_only = interaction_only
      self.include_bias = include_bias
  
      indices = [
          i
          for j in range(n_features)
          for i in range(j * n_features + j, (j + 1) * n_features)
      ]
      self.n_poly_features = len(indices)
      self.n_features = n_features
      self.indices = torch.nn.Parameter(
          torch.LongTensor(indices), requires_grad=False
      )
  
      self.bias = torch.nn.Parameter(
          torch.FloatTensor([1.0]), requires_grad=False
      )
  
file_path: hummingbird/hummingbird/ml/operator_converters/sklearn/poly_features.py
imports: from .._physical_operator import PhysicalOperator
  from onnxconverter_common.registration import register_converter
  import torch
label_desc: Use image node_id 1 to create a new PolynomialFeatures object from inherited base classes: PhysicalOperator, torch.nn with example: obj = PolynomialFeatures(operator, n_features, degree, interaction_only, include_bias, device)