class_docstr: This class represents a hyperparameter.
class_docstr_tok: ["This","class","represents","a","hyperparameter","."]
code: def getLog10Cardinality(self):
      if "anyOf" in self.config or "oneOf" in self.config:
          v = "anyOf" if "anyOf" in self.config else "oneOf"
          data = self.config[v]
  
          log10_cardinality = Hyperparameter(
              data[0], self, self.root + ".0"
          ).getLog10Cardinality()
          for index, subParam in enumerate(data[1:]):
              # We used logarithm identities to create this reduction formula
              other_log10_cardinality = Hyperparameter(
                  subParam, self, self.root + "." + str(index)
              ).getLog10Cardinality()
  
              # Revert to linear at high and low values, for numerical stability. Check here: https://www.desmos.com/calculator/efkbbftd18 to observe
              if (log10_cardinality - other_log10_cardinality) > 3:
                  log10_cardinality = log10_cardinality + 1
              elif (other_log10_cardinality - log10_cardinality) > 3:
                  log10_cardinality = other_log10_cardinality + 1
              else:
                  log10_cardinality = (
                      other_log10_cardinality
                      + math.log10(
                          1
                          + math.pow(
                              10,
                              log10_cardinality
                              - other_log10_cardinality,
                          )
                      )
                  )
          return log10_cardinality + math.log10(len(data))
      elif "enum" in self.config:
          return math.log10(len(self.config["enum"]))
      elif "constant" in self.config:
          return math.log10(1)
      elif self.config["type"] == "object":
          log10_cardinality = 0
          for index, subParam in enumerate(
              self.config["properties"].values()
          ):
              subParameter = Hyperparameter(
                  subParam, self, self.root + "." + str(index)
              )
              log10_cardinality += subParameter.getLog10Cardinality()
          return log10_cardinality
      elif self.config["type"] == "number":
          if "rounding" in self.config:
              return math.log10(
                  min(
                      20,
                      (self.config["max"] - self.config["min"])
                      / self.config["rounding"]
                      + 1,
                  )
              )
          else:
              # Default of 20 for fully uniform numbers.
              return math.log10(20)
  
imports: from hyperopt import hp
  from contextlib import contextmanager
  import re
  import functools
  import random
  import numpy
  import numpy.random
  import pkg_resources
  import tempfile
  import scipy.stats
  import os
  import math
  import hyperopt
  import datetime
  import json
  import copy
label_desc: Use image node_id 5 for calling the Hyperparameter obj's underlying member method code with example usage: obj.getLog10Cardinality() and returns: unknown, math, math, log10_cardinality, math, math