class_docstr: RationalQuadratic Kernel.
  
  This kernel function has the form:
  
  ```none
  k(x, y) = amplitude**2 * (1. + ||x - y|| ** 2 / (
    2 * scale_mixture_rate * length_scale**2)) ** -scale_mixture_rate
  ```
  
  where the double-bars represent vector length (i.e. Euclidean, or L2 Norm).
  This kernel acts over the space `S = R^(D1 x D2 .. Dd)`. When
  `scale_mixture_rate` tends towards infinity, this kernel acts like an
  ExponentiatedQuadratic kernel.
  
  The name `scale_mixture_rate` comes from the interpretation that that this
  kernel is an Inverse-Gamma weighted mixture of ExponentiatedQuadratic Kernels
  with different length scales.
  
  More formally, if `r = ||x - y|||`, then:
  
  ```none
  integral from 0 to infinity (k_EQ(r | sqrt(t)) p(t | a, a * l ** 2)) dt =
    (1 + r**2 / (2 * a * l ** 2)) ** -a = k(r)
  ```
  
  where:
    * `a = scale_mixture_rate`
    * `l = length_scale`
    * `p(t | a, b)` is the Inverse-Gamma density.
      https://en.wikipedia.org/wiki/Inverse-gamma_distribution
    * `k_EQ(r | l) = exp(-r ** 2 / (2 * l ** 2)` is the ExponentiatedQuadratic
      positive semidefinite kernel.
  
  #### References
  
  [1]: Filip Tronarp, Toni Karvonen, and Simo Saarka. Mixture
       representation of the Matern class with applications in state space
       approximations and Bayesian quadrature. In _28th IEEE International
       Workshop on Machine Learning for Signal Processing_, 2018.
       https://acris.aalto.fi/ws/portalfiles/portal/30548539/ELEC_Tronarp_etal_Mixture_Presentation_of_the_Matern_MLSP2018.pdf
class_docstr_tok: ["RationalQuadratic","Kernel",".","This","kernel","function","has","the","form",":","``","`","none","k","(","x",",","y",")","=","amplitude","*","*","2","*","(","1",".","+","||x","-","y||","*","*","2","\/","(","2","*","scale_mixture_rate","*","length_scale","*","*","2",")",")","*","*","-scale_mixture_rate","``","`","where","the","double-bars","represent","vector","length","(","i.e",".","Euclidean",",","or","L2","Norm",")",".","This","kernel","acts","over","the","space","`","S","=","R^","(","D1","x","D2","..","Dd",")","`",".","When","`","scale_mixture_rate","`","tends","towards","infinity",",","this","kernel","acts","like","an","ExponentiatedQuadratic","kernel",".","The","name","`","scale_mixture_rate","`","comes","from","the","interpretation","that","that","this","kernel","is","an","Inverse-Gamma","weighted","mixture","of","ExponentiatedQuadratic","Kernels","with","different","length","scales",".","More","formally",",","if","`","r","=","||x","-","y|||","`",",","then",":","``","`","none","integral","from","0","to","infinity","(","k_EQ","(","r","|","sqrt","(","t",")",")","p","(","t","|","a",",","a","*","l","*","*","2",")",")","dt","=","(","1","+","r","*","*","2","\/","(","2","*","a","*","l","*","*","2",")",")","*","*","-a","=","k","(","r",")","``","`","where",":","*","`","a","=","scale_mixture_rate","`","*","`","l","=","length_scale","`","*","`","p","(","t","|","a",",","b",")","`","is","the","Inverse-Gamma","density",".","https",":","\/\/en.wikipedia.org\/wiki\/Inverse-gamma_distribution","*","`","k_EQ","(","r","|","l",")","=","exp","(","-r","*","*","2","\/","(","2","*","l","*","*","2",")","`","is","the","ExponentiatedQuadratic","positive","semidefinite","kernel",".","#","#","#","#","References","[","1","]",":","Filip","Tronarp",",","Toni","Karvonen",",","and","Simo","Saarka",".","Mixture","representation","of","the","Matern","class","with","applications","in","state","space","approximations","and","Bayesian","quadrature",".","In","_28th","IEEE","International","Workshop","on","Machine","Learning","for","Signal","Processing_",",","2018.","https",":","\/\/acris.aalto.fi\/ws\/portalfiles\/portal\/30548539\/ELEC_Tronarp_etal_Mixture_Presentation_of_the_Matern_MLSP2018.pdf"]
docstr: Construct a RationalQuadratic kernel instance.
  
  Args:
    amplitude: Positive floating point `Tensor` that controls the maximum
      value of the kernel. Must be broadcastable with `length_scale` and
      `scale_mixture_rate` and inputs to `apply` and `matrix` methods. A
      value of `None` is treated like 1.
      Default value: None
    length_scale: Positive floating point `Tensor` that controls how sharp or
      wide the kernel shape is. This provides a characteristic "unit" of
      length against which `||x - y||` can be compared for scale. Must be
      broadcastable with `amplitude`, `scale_mixture_rate`  and inputs to
      `apply` and `matrix` methods. A value of `None` is treated like 1.
      Default value: None
    inverse_length_scale: Non-negative floating point `Tensor` that is
      treated as `1 / length_scale`. Only one of `length_scale` or
      `inverse_length_scale` should be provided.
      Default value: None
    scale_mixture_rate: Positive floating point `Tensor` that controls how the
      ExponentiatedQuadratic kernels are mixed.  Must be broadcastable with
      `amplitude`, `length_scale` and inputs to `apply` and `matrix` methods.
      A value of `None` is treated like 1.
      Default value: None
    feature_ndims: Python `int` number of rightmost dims to include in the
      squared difference norm in the exponential.
    validate_args: If `True`, parameters are checked for validity despite
      possibly degrading runtime performance
    name: Python `str` name prefixed to Ops created by this class.
docstr_tok: ["Construct","a","RationalQuadratic","kernel","instance",".","Args",":","amplitude",":","Positive","floating","point","`","Tensor","`","that","controls","the","maximum","value","of","the","kernel",".","Must","be","broadcastable","with","`","length_scale","`","and","`","scale_mixture_rate","`","and","inputs","to","`","apply","`","and","`","matrix","`","methods",".","A","value","of","`","None","`","is","treated","like","1",".","Default","value",":","None","length_scale",":","Positive","floating","point","`","Tensor","`","that","controls","how","sharp","or","wide","the","kernel","shape","is",".","This","provides","a","characteristic","``","unit","''","of","length","against","which","`","||x","-","y||","`","can","be","compared","for","scale",".","Must","be","broadcastable","with","`","amplitude","`",",","`","scale_mixture_rate","`","and","inputs","to","`","apply","`","and","`","matrix","`","methods",".","A","value","of","`","None","`","is","treated","like","1",".","Default","value",":","None","inverse_length_scale",":","Non-negative","floating","point","`","Tensor","`","that","is","treated","as","`","1","\/","length_scale","`",".","Only","one","of","`","length_scale","`","or","`","inverse_length_scale","`","should","be","provided",".","Default","value",":","None","scale_mixture_rate",":","Positive","floating","point","`","Tensor","`","that","controls","how","the","ExponentiatedQuadratic","kernels","are","mixed",".","Must","be","broadcastable","with","`","amplitude","`",",","`","length_scale","`","and","inputs","to","`","apply","`","and","`","matrix","`","methods",".","A","value","of","`","None","`","is","treated","like","1",".","Default","value",":","None","feature_ndims",":","Python","`","int","`","number","of","rightmost","dims","to","include","in","the","squared","difference","norm","in","the","exponential",".","validate_args",":","If","`","True","`",",","parameters","are","checked","for","validity","despite","possibly","degrading","runtime","performance","name",":","Python","`","str","`","name","prefixed","to","Ops","created","by","this","class","."]
code: def __init__(
      self,
      amplitude=None,
      length_scale=None,
      inverse_length_scale=None,
      scale_mixture_rate=None,
      feature_ndims=1,
      validate_args=False,
      name="RationalQuadratic",
  ):
      """Construct a RationalQuadratic kernel instance.
  
      Args:
        amplitude: Positive floating point `Tensor` that controls the maximum
          value of the kernel. Must be broadcastable with `length_scale` and
          `scale_mixture_rate` and inputs to `apply` and `matrix` methods. A
          value of `None` is treated like 1.
          Default value: None
        length_scale: Positive floating point `Tensor` that controls how sharp or
          wide the kernel shape is. This provides a characteristic "unit" of
          length against which `||x - y||` can be compared for scale. Must be
          broadcastable with `amplitude`, `scale_mixture_rate`  and inputs to
          `apply` and `matrix` methods. A value of `None` is treated like 1.
          Default value: None
        inverse_length_scale: Non-negative floating point `Tensor` that is
          treated as `1 / length_scale`. Only one of `length_scale` or
          `inverse_length_scale` should be provided.
          Default value: None
        scale_mixture_rate: Positive floating point `Tensor` that controls how the
          ExponentiatedQuadratic kernels are mixed.  Must be broadcastable with
          `amplitude`, `length_scale` and inputs to `apply` and `matrix` methods.
          A value of `None` is treated like 1.
          Default value: None
        feature_ndims: Python `int` number of rightmost dims to include in the
          squared difference norm in the exponential.
        validate_args: If `True`, parameters are checked for validity despite
          possibly degrading runtime performance
        name: Python `str` name prefixed to Ops created by this class.
      """
      parameters = dict(locals())
      if (length_scale is not None) and (
          inverse_length_scale is not None
      ):
          raise ValueError(
              "Must specify at most one of `length_scale` and "
              "`inverse_length_scale`."
          )
      with tf.name_scope(name) as name:
          dtype = util.maybe_get_common_dtype(
              [
                  amplitude,
                  scale_mixture_rate,
                  inverse_length_scale,
                  length_scale,
              ]
          )
  
          self._amplitude = tensor_util.convert_nonref_to_tensor(
              amplitude, name="amplitude", dtype=dtype
          )
          self._scale_mixture_rate = (
              tensor_util.convert_nonref_to_tensor(
                  scale_mixture_rate,
                  name="scale_mixture_rate",
                  dtype=dtype,
              )
          )
          self._length_scale = tensor_util.convert_nonref_to_tensor(
              length_scale, name="length_scale", dtype=dtype
          )
          self._inverse_length_scale = (
              tensor_util.convert_nonref_to_tensor(
                  inverse_length_scale,
                  name="inverse_length_scale",
                  dtype=dtype,
              )
          )
  
          super(RationalQuadratic, self).__init__(
              feature_ndims,
              dtype=dtype,
              name=name,
              validate_args=validate_args,
              parameters=parameters,
          )
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  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 RationalQuadratic object from inherited base classes: psd_kernel with example: obj = RationalQuadratic(amplitude, length_scale, inverse_length_scale, scale_mixture_rate, feature_ndims, validate_args, name)