class_docstr: A Beta likelihood for regressing over percentages.
  
  The Beta distribution is parameterized by :math:`\alpha > 0` and :math:`\beta > 0` parameters
  which roughly correspond to the number of prior positive and negative observations.
  We instead parameterize it through a mixture :math:`m \in [0, 1]` and scale :math:`s > 0` parameter.
  
  .. math::
      \begin{equation*}
          \alpha = ms, \quad \beta = (1-m)s
      \end{equation*}
  
  The mixture parameter is the output of the GP passed through a logit function :math:`\sigma(\cdot)`.
  The scale parameter is learned.
  
  .. math::
      p(y \mid f) = \text{Beta} \left( \sigma(f) s , (1 - \sigma(f)) s\right)
  
  :param batch_shape: The batch shape of the learned noise parameter (default: []).
  :param scale_prior: Prior for scale parameter :math:`s`.
  :param scale_constraint: Constraint for scale parameter :math:`s`.
  
  :ivar torch.Tensor scale: :math:`s` parameter (scale)
code: def __init__(
      self,
      batch_shape: torch.Size = torch.Size([]),
      scale_prior: Optional[Prior] = None,
      scale_constraint: Optional[Interval] = None,
  ) -> None:
      super().__init__()
  
      if scale_constraint is None:
          scale_constraint = Positive()
  
      self.raw_scale = torch.nn.Parameter(torch.ones(*batch_shape, 1))
      if scale_prior is not None:
          self.register_prior(
              "scale_prior",
              scale_prior,
              lambda m: m.scale,
              lambda m, v: m._set_scale(v),
          )
  
      self.register_constraint("raw_scale", scale_constraint)
  
file_path: gpytorch/gpytorch/likelihoods/beta_likelihood.py
imports: from typing import Any, Optional
  import torch
  from torch import Tensor
  from torch.distributions import Beta
  from ..constraints import Interval, Positive
  from ..distributions import base_distributions
  from ..priors import Prior
  from .likelihood import _OneDimensionalLikelihood
label_desc: Use image node_id 1 to create a new BetaLikelihood object from inherited base classes: _OneDimensionalLikelihood with example: obj = BetaLikelihood(batch_shape, scale_prior, scale_constraint)