class_docstr: Super class for all numerical type hyperparameters.
docstr: Convert a numerical value to range [0.0, 1.0).
docstr_tok: ["Convert","a","numerical","value","to","range","[","0.0",",","1.0",")","."]
code: def _numerical_to_prob(self, value, max_value=None):
      """Convert a numerical value to range [0.0, 1.0)."""
      if max_value is None:
          max_value = self.max_value
      if max_value == self.min_value:
          # Center the prob
          return 0.5
      if self.sampling == "linear":
          return (value - self.min_value) / (max_value - self.min_value)
      if self.sampling == "log":
          return math.log(value / self.min_value) / math.log(
              max_value / self.min_value
          )
      if self.sampling == "reverse_log":
          return 1.0 - math.log(
              (max_value + self.min_value - value) / self.min_value
          ) / math.log(max_value / self.min_value)
  
file_path: keras-tuner/keras_tuner/engine/hyperparameters/hp_types/numerical.py
imports: import math
  from keras_tuner.engine.hyperparameters import hp_utils
  from keras_tuner.engine.hyperparameters import hyperparameter
label_desc: Use image node_id 4 for calling the Numerical obj's underlying member method code with example usage: obj._numerical_to_prob(value, max_value) and returns: int, unknown, unknown, unknown