class_docstr: A classification likelihood that treats the labels as regression targets with fixed heteroscedastic noise.
  From Milios et al, NeurIPS, 2018 [https://arxiv.org/abs/1805.10915].
  
  .. note::
      This likelihood can be used for exact or approximate inference.
  
  :param targets: (... x N) Classification labels.
  :param alpha_epsilon: Tuning parameter for the scaling of the likeihood targets. We'd suggest 0.01 or setting
      via cross-validation.
  :param learn_additional_noise: Set to true if you additionally want to
      learn added diagonal noise, similar to GaussianLikelihood.
  :param batch_shape: The batch shape of the learned noise parameter (default
      []) if :obj:`learn_additional_noise=True`.
  
  :ivar torch.Tensor noise: :math:`\sigma^2` parameter (noise)
  
  .. note::
      DirichletClassificationLikelihood has an analytic marginal distribution.
  
  Example:
      >>> train_x = torch.randn(55, 1)
      >>> labels = torch.round(train_x).long()
      >>> likelihood = DirichletClassificationLikelihood(targets=labels, learn_additional_noise=True)
      >>> pred_y = likelihood(gp_model(train_x))
      >>>
      >>> test_x = torch.randn(21, 1)
      >>> test_labels = torch.round(test_x).long()
      >>> pred_y = likelihood(gp_model(test_x), targets=labels)
class_docstr_tok: ["A","classification","likelihood","that","treats","the","labels","as","regression","targets","with","fixed","heteroscedastic","noise",".","From","Milios","et","al",",","NeurIPS",",","2018","[","https",":","\/\/arxiv.org\/abs\/1805.10915","]",".","..","note",":",":","This","likelihood","can","be","used","for","exact","or","approximate","inference",".",":","param","targets",":","(","...","x","N",")","Classification","labels",".",":","param","alpha_epsilon",":","Tuning","parameter","for","the","scaling","of","the","likeihood","targets",".","We","'d","suggest","0.01","or","setting","via","cross-validation",".",":","param","learn_additional_noise",":","Set","to","true","if","you","additionally","want","to","learn","added","diagonal","noise",",","similar","to","GaussianLikelihood",".",":","param","batch_shape",":","The","batch","shape","of","the","learned","noise","parameter","(","default","[","]",")","if",":","obj",":","`","learn_additional_noise=True","`",".",":","ivar","torch.Tensor","noise",":",":","math",":","`","\\sigma^2","`","parameter","(","noise",")","..","note",":",":","DirichletClassificationLikelihood","has","an","analytic","marginal","distribution",".","Example",":",">",">",">","train_x","=","torch.randn","(","55",",","1",")",">",">",">","labels","=","torch.round","(","train_x",")",".long","(",")",">",">",">","likelihood","=","DirichletClassificationLikelihood","(","targets=labels",",","learn_additional_noise=True",")",">",">",">","pred_y","=","likelihood","(","gp_model","(","train_x",")",")",">",">",">",">",">",">","test_x","=","torch.randn","(","21",",","1",")",">",">",">","test_labels","=","torch.round","(","test_x",")",".long","(",")",">",">",">","pred_y","=","likelihood","(","gp_model","(","test_x",")",",","targets=labels",")"]
code: def __call__(
      self,
      input: Union[Tensor, MultivariateNormal],
      *args: Any,
      **kwargs: Any,
  ) -> Distribution:
      if "targets" in kwargs:
          targets = kwargs.pop("targets")
          dtype = self.transformed_targets.dtype
          new_noise, _, _ = self._prepare_targets(targets, dtype=dtype)
          kwargs["noise"] = new_noise
      return super().__call__(input, *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 5 for calling the DirichletClassificationLikelihood obj's underlying member method code with example usage: obj.__call__(input) and returns: super