docstr: Create an Additive Kernel a la https://arxiv.org/abs/1112.4394 using Newton-Girard Formulae
  
  :param base_kernel: a base 1-dimensional kernel. NOTE: put ard_num_dims=d in the base kernel...
  :param max_degree: the maximum numbers of kernel degrees to compute
  :param active_dims:
  :param kwargs:
docstr_tok: ["Create","an","Additive","Kernel","a","la","https",":","\/\/arxiv.org\/abs\/1112.4394","using","Newton-Girard","Formulae",":","param","base_kernel",":","a","base","1-dimensional","kernel",".","NOTE",":","put","ard_num_dims=d","in","the","base","kernel","...",":","param","max_degree",":","the","maximum","numbers","of","kernel","degrees","to","compute",":","param","active_dims",":",":","param","kwargs",":"]
code: def __init__(
      self,
      base_kernel: Kernel,
      num_dims: int,
      max_degree: Optional[int] = None,
      active_dims: Optional[Tuple[int, ...]] = None,
      **kwargs,
  ):
      """Create an Additive Kernel a la https://arxiv.org/abs/1112.4394 using Newton-Girard Formulae
  
      :param base_kernel: a base 1-dimensional kernel. NOTE: put ard_num_dims=d in the base kernel...
      :param max_degree: the maximum numbers of kernel degrees to compute
      :param active_dims:
      :param kwargs:
      """
      super(NewtonGirardAdditiveKernel, self).__init__(
          active_dims=active_dims, **kwargs
      )
  
      self.base_kernel = base_kernel
      self.num_dims = num_dims
      if max_degree is None:
          self.max_degree = self.num_dims
      elif (
          max_degree > self.num_dims
      ):  # force cap on max_degree (silently)
          self.max_degree = self.num_dims
      else:
          self.max_degree = max_degree
  
      self.register_parameter(
          name="raw_outputscale",
          parameter=torch.nn.Parameter(
              torch.zeros(*self.batch_shape, self.max_degree)
          ),
      )
      outputscale_constraint = Positive()
      self.register_constraint(
          "raw_outputscale", outputscale_constraint
      )
      self.outputscale_constraint = outputscale_constraint
      self.outputscale = [
          1 / self.max_degree for _ in range(self.max_degree)
      ]
  
file_path: gpytorch/gpytorch/kernels/newton_girard_additive_kernel.py
imports: from typing import Optional, Tuple
  import torch
  from linear_operator import to_dense
  from ..constraints import Positive
  from .kernel import Kernel
label_desc: Use image node_id 1 to create a new NewtonGirardAdditiveKernel object from inherited base classes: Kernel with example: obj = NewtonGirardAdditiveKernel(base_kernel, num_dims, max_degree, active_dims)