class_docstr: Base class for Gaussian Likelihoods, supporting general heteroskedastic noise models.
class_docstr_tok: ["Base","class","for","Gaussian","Likelihoods",",","supporting","general","heteroskedastic","noise","models","."]
code: def marginal(
      self,
      function_dist: MultivariateNormal,
      *params: Any,
      **kwargs: Any,
  ) -> MultivariateNormal:
      mean, covar = (
          function_dist.mean,
          function_dist.lazy_covariance_matrix,
      )
      noise_covar = self._shaped_noise_covar(
          mean.shape, *params, **kwargs
      )
      full_covar = covar + noise_covar
      return function_dist.__class__(mean, full_covar)
  
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 6 for calling the _GaussianLikelihoodBase obj's underlying member method code with example usage: obj.marginal(function_dist) and returns: function_dist