class_docstr: A Likelihood that assumes fixed heteroscedastic noise. This is useful when you have fixed, known observation
  noise for each training example.
  
  Note that this likelihood takes an additional argument when you call it, `noise`, that adds a specified amount
  of noise to the passed MultivariateNormal. This allows for adding known observational noise to test data.
  
  .. note::
      This likelihood can be used for exact or approximate inference.
  
  :param noise: Known observation noise (variance) for each training example.
  :type noise: torch.Tensor (... x N)
  :param learn_additional_noise: Set to true if you additionally want to
      learn added diagonal noise, similar to GaussianLikelihood.
  :type learn_additional_noise: bool, optional
  :param batch_shape: The batch shape of the learned noise parameter (default
      []) if :obj:`learn_additional_noise=True`.
  :type batch_shape: torch.Size, optional
  
  :var torch.Tensor noise: :math:`\sigma^2` parameter (noise)
  
  .. note::
      FixedNoiseGaussianLikelihood has an analytic marginal distribution.
  
  Example:
      >>> train_x = torch.randn(55, 2)
      >>> noises = torch.ones(55) * 0.01
      >>> likelihood = FixedNoiseGaussianLikelihood(noise=noises, learn_additional_noise=True)
      >>> pred_y = likelihood(gp_model(train_x))
      >>>
      >>> test_x = torch.randn(21, 2)
      >>> test_noises = torch.ones(21) * 0.02
      >>> pred_y = likelihood(gp_model(test_x), noise=test_noises)
class_docstr_tok: ["A","Likelihood","that","assumes","fixed","heteroscedastic","noise",".","This","is","useful","when","you","have","fixed",",","known","observation","noise","for","each","training","example",".","Note","that","this","likelihood","takes","an","additional","argument","when","you","call","it",",","`","noise","`",",","that","adds","a","specified","amount","of","noise","to","the","passed","MultivariateNormal",".","This","allows","for","adding","known","observational","noise","to","test","data",".","..","note",":",":","This","likelihood","can","be","used","for","exact","or","approximate","inference",".",":","param","noise",":","Known","observation","noise","(","variance",")","for","each","training","example",".",":","type","noise",":","torch.Tensor","(","...","x","N",")",":","param","learn_additional_noise",":","Set","to","true","if","you","additionally","want","to","learn","added","diagonal","noise",",","similar","to","GaussianLikelihood",".",":","type","learn_additional_noise",":","bool",",","optional",":","param","batch_shape",":","The","batch","shape","of","the","learned","noise","parameter","(","default","[","]",")","if",":","obj",":","`","learn_additional_noise=True","`",".",":","type","batch_shape",":","torch.Size",",","optional",":","var","torch.Tensor","noise",":",":","math",":","`","\\sigma^2","`","parameter","(","noise",")","..","note",":",":","FixedNoiseGaussianLikelihood","has","an","analytic","marginal","distribution",".","Example",":",">",">",">","train_x","=","torch.randn","(","55",",","2",")",">",">",">","noises","=","torch.ones","(","55",")","*","0.01",">",">",">","likelihood","=","FixedNoiseGaussianLikelihood","(","noise=noises",",","learn_additional_noise=True",")",">",">",">","pred_y","=","likelihood","(","gp_model","(","train_x",")",")",">",">",">",">",">",">","test_x","=","torch.randn","(","21",",","2",")",">",">",">","test_noises","=","torch.ones","(","21",")","*","0.02",">",">",">","pred_y","=","likelihood","(","gp_model","(","test_x",")",",","noise=test_noises",")"]
docstr: :return: Analytic marginal :math:`p(\mathbf y)`.
code: def marginal(
      self, function_dist: MultivariateNormal, *args: Any, **kwargs: Any
  ) -> MultivariateNormal:
      r"""
      :return: Analytic marginal :math:`p(\mathbf y)`.
      """
      return super().marginal(function_dist, *args, **kwargs)
  
imports: import math
  import warnings
  from copy import deepcopy
  from typing import Any, Optional, Tuple, Union
  import torch
  from linear_operator.operators import LinearOperator, MaskedLinearOperator, ZeroLinearOperator
  from torch import Tensor
  from torch.distributions import Distribution, Normal
  from ..None import settings
  from ..constraints import Interval
  from ..distributions import base_distributions, MultivariateNormal
  from ..priors import Prior
  from ..utils.warnings import GPInputWarning
  from .likelihood import Likelihood
  from .noise_models import FixedGaussianNoise, HomoskedasticNoise, Noise
label_desc: Use image node_id 8 for calling the FixedNoiseGaussianLikelihood obj's underlying member method code with example usage: obj.marginal(function_dist) and returns: super