class_docstr: Horseshoe Prior as it is used in spearmint.
  
  Parameters
  ----------
  scale: float
      Scaling parameter.
  seed : int, defaults to 0
class_docstr_tok: ["Horseshoe","Prior","as","it","is","used","in","spearmint",".","Parameters","--","--","--","--","--","scale",":","float","Scaling","parameter",".","seed",":","int",",","defaults","to","0"]
code: def _get_log_probability(self, theta: float) -> float:
      # We computed it exactly as in the original spearmint code, they basically say that there's no analytical form
      # of the horseshoe prior, but that the multiplier is bounded between 2 and 4 and that they used the middle
      # See "The horseshoe estimator for sparse signals" by Carvalho, Poloson and Scott (2010), Equation 1.
      # https://www.jstor.org/stable/25734098
      # Compared to the paper by Carvalho, there's a constant multiplicator missing
      # Compared to Spearmint we first have to undo the log space transformation of the theta
      # Note: "undo log space transformation" is done in parent class
      if theta == 0:
          return np.inf  # POSITIVE infinity (this is the "spike")
      else:
          a = math.log(1 + 3.0 * (self._scale_square / theta**2))
          return math.log(a + VERY_SMALL_NUMBER)
  
file_path: SMAC3/smac/model/gaussian_process/priors/horseshoe_prior.py
imports: from __future__ import annotations
  from typing import Any
  import math
  import numpy
  from smac.constants import VERY_SMALL_NUMBER
  from smac.model.gaussian_process.priors.abstract_prior import AbstractPrior
label_desc: Use image node_id 4 for calling the HorseshoePrior obj's underlying member method code with example usage: obj._get_log_probability(theta) and returns: np, math