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_gradient(self, theta: float) -> float:
      if theta == 0:
          return np.inf  # POSITIVE infinity (this is the "spike")
      else:
          a = -(6 * self._scale_square)
          b = 3 * self._scale_square + theta**2
          b *= math.log(3 * self._scale_square * theta ** (-2) + 1)
          b = max(b, 1e-14)
  
          return a / b
  
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 5 for calling the HorseshoePrior obj's underlying member method code with example usage: obj._get_gradient(theta) and returns: np, unknown