class_docstr: Additive Kernel.
  
  This kernel has the following form
  ```none
  k(x, y) = sum k_add_i(x, y)
  k_add_n(x, y) = a_n**2 sum_{1<=i1<i2<...in} prod k_i(x[i], y[i])
  ```
  Where $k_i$ is the one-dimensional base kernel for the `i`th dimension.
  
  In other words, this computes sums of elementary symmetric polynomials
  over `k_i(x[i], y[i])`.
  
  This kernel is very related to the ANOVA kernel defined as:
  `k_{ANOVA}(x, y) = prod (1 + k_i(x[i], x[i])`. `k_{ANOVA}` is
  equivalent to a special case of this kernel where the `amplitudes` are
  all one, along with a constant shift by 1.
  
  #### References
  
  [1] D. Duvenaud, H. Nickish, C. E. Rasmussen, Additive Gaussian Process.
  https://hannes.nickisch.org/papers/conferences/duvenaud11gpadditive.pdf
  
  [2] M. Stitson, A. Gammerman, V. Vapnik, V. Vovk, et al.
      Support Vector Regression with ANOVA Decomposition Kernels
      http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.7818&rep=rep1&type=pdf
class_docstr_tok: ["Additive","Kernel",".","This","kernel","has","the","following","form","``","`","none","k","(","x",",","y",")","=","sum","k_add_i","(","x",",","y",")","k_add_n","(","x",",","y",")","=","a_n","*","*","2","sum_","{","1","<","=i1","<","i2","<","...","in","}","prod","k_i","(","x","[","i","]",",","y","[","i","]",")","``","`","Where","$","k_i","$","is","the","one-dimensional","base","kernel","for","the","`","i","`","th","dimension",".","In","other","words",",","this","computes","sums","of","elementary","symmetric","polynomials","over","`","k_i","(","x","[","i","]",",","y","[","i","]",")","`",".","This","kernel","is","very","related","to","the","ANOVA","kernel","defined","as",":","`","k_","{","ANOVA","}","(","x",",","y",")","=","prod","(","1","+","k_i","(","x","[","i","]",",","x","[","i","]",")","`",".","`","k_","{","ANOVA","}","`","is","equivalent","to","a","special","case","of","this","kernel","where","the","`","amplitudes","`","are","all","one",",","along","with","a","constant","shift","by","1",".","#","#","#","#","References","[","1","]","D.","Duvenaud",",","H.","Nickish",",","C.","E.","Rasmussen",",","Additive","Gaussian","Process",".","https",":","\/\/hannes.nickisch.org\/papers\/conferences\/duvenaud11gpadditive.pdf","[","2","]","M.","Stitson",",","A.","Gammerman",",","V.","Vapnik",",","V.","Vovk",",","et","al",".","Support","Vector","Regression","with","ANOVA","Decomposition","Kernels","http",":","\/\/citeseerx.ist.psu.edu\/viewdoc\/download","?","doi=10.1.1.34.7818","&","rep=rep1","&","type=pdf"]
docstr: Instantiates an `AdditiveKernel`.
  
  Args:
    kernel: An instance of `PositiveSemidefiniteKernel`s that are defined
      within this class (specifically they allow for reinterpreting
      batch dimensions as feature dimensions) that act on inputs of
      the form `[B1, ...., Bk, D, 1]`; that is, `kernel` is a batch of
      D-kernels, each acting on 1-dimensional inputs. We assume that the
      kernel has a batch dimension broadcastable with `[D]`. `kernel` must
      inherit from `tf.__internal__.CompositeTensor`.
    amplitudes: `Tensor` of shape `[B1, ...., Bk, M]`, where `M` is the order
      of the additive kernel. `M` must be statically identifiable.
    validate_args: Python `bool`, default `False`. When `True` kernel
      parameters are checked for validity despite possibly degrading runtime
      performance. When `False` invalid inputs may silently render incorrect
      outputs.
    name: Python `str` name prefixed to Ops created by this class. Default:
      subclass name.
  Raises:
    TypeError: if `kernel` is not an instance of
      `tf.__internal__.CompositeTensor`.
docstr_tok: ["Instantiates","an","`","AdditiveKernel","`",".","Args",":","kernel",":","An","instance","of","`","PositiveSemidefiniteKernel","`","s","that","are","defined","within","this","class","(","specifically","they","allow","for","reinterpreting","batch","dimensions","as","feature","dimensions",")","that","act","on","inputs","of","the","form","`","[","B1",",","....",",","Bk",",","D",",","1","]","`",";","that","is",",","`","kernel","`","is","a","batch","of","D-kernels",",","each","acting","on","1-dimensional","inputs",".","We","assume","that","the","kernel","has","a","batch","dimension","broadcastable","with","`","[","D","]","`",".","`","kernel","`","must","inherit","from","`","tf.__internal__.CompositeTensor","`",".","amplitudes",":","`","Tensor","`","of","shape","`","[","B1",",","....",",","Bk",",","M","]","`",",","where","`","M","`","is","the","order","of","the","additive","kernel",".","`","M","`","must","be","statically","identifiable",".","validate_args",":","Python","`","bool","`",",","default","`","False","`",".","When","`","True","`","kernel","parameters","are","checked","for","validity","despite","possibly","degrading","runtime","performance",".","When","`","False","`","invalid","inputs","may","silently","render","incorrect","outputs",".","name",":","Python","`","str","`","name","prefixed","to","Ops","created","by","this","class",".","Default",":","subclass","name",".","Raises",":","TypeError",":","if","`","kernel","`","is","not","an","instance","of","`","tf.__internal__.CompositeTensor","`","."]
code: def __init__(
      self,
      kernel,
      amplitudes,
      validate_args=False,
      name="AdditiveKernel",
  ):
      """Instantiates an `AdditiveKernel`.
  
      Args:
        kernel: An instance of `PositiveSemidefiniteKernel`s that are defined
          within this class (specifically they allow for reinterpreting
          batch dimensions as feature dimensions) that act on inputs of
          the form `[B1, ...., Bk, D, 1]`; that is, `kernel` is a batch of
          D-kernels, each acting on 1-dimensional inputs. We assume that the
          kernel has a batch dimension broadcastable with `[D]`. `kernel` must
          inherit from `tf.__internal__.CompositeTensor`.
        amplitudes: `Tensor` of shape `[B1, ...., Bk, M]`, where `M` is the order
          of the additive kernel. `M` must be statically identifiable.
        validate_args: Python `bool`, default `False`. When `True` kernel
          parameters are checked for validity despite possibly degrading runtime
          performance. When `False` invalid inputs may silently render incorrect
          outputs.
        name: Python `str` name prefixed to Ops created by this class. Default:
          subclass name.
      Raises:
        TypeError: if `kernel` is not an instance of
          `tf.__internal__.CompositeTensor`.
      """
      parameters = dict(locals())
      with tf.name_scope(name):
          if not isinstance(kernel, tf.__internal__.CompositeTensor):
              raise TypeError(
                  "`kernel` must inherit from "
                  "`tf.__internal__.CompositeTensor`."
              )
          dtype = util.maybe_get_common_dtype([kernel, amplitudes])
          self._kernel = kernel
          self._amplitudes = tensor_util.convert_nonref_to_tensor(
              amplitudes, name="amplitudes", dtype=dtype
          )
          super(AdditiveKernel, self).__init__(
              feature_ndims=self.kernel.feature_ndims,
              dtype=dtype,
              name=name,
              validate_args=validate_args,
              parameters=parameters,
          )
  
file_path: probability/tensorflow_probability/python/experimental/psd_kernels/additive_kernel.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math.psd_kernels import positive_semidefinite_kernel
  from tensorflow_probability.python.math.psd_kernels.internal import util
label_desc: Use image node_id 1 to create a new AdditiveKernel object from inherited base classes: psd_kernel with example: obj = AdditiveKernel(kernel, amplitudes, validate_args, name)