class_docstr: Holds the param-space coordinates (X) and target values (Y)
  
  Parameters
  ----------
  pbounds : dict
      Dictionary with parameters names and legal values.
  
  random_state : int, RandomState, or None
      optionally specify a seed for a random number generator, by default None.
class_docstr_tok: ["Holds","the","param-space","coordinates","(","X",")","and","target","values","(","Y",")","Parameters","--","--","--","--","--","pbounds",":","dict","Dictionary","with","parameters","names","and","legal","values",".","random_state",":","int",",","RandomState",",","or","None","optionally","specify","a","seed","for","a","random","number","generator",",","by","default","None","."]
code: def __init__(self, pbounds, random_state=None):
      self._random_state = random_state
  
      # Get the name of the parameters
      self._keys = sorted(pbounds)
  
      # Create an array with parameters bounds
      self._bounds = np.array(
          [
              item[1]
              for item in sorted(pbounds.items(), key=lambda x: x[0])
          ]
      )
  
      # check values type
      for _bound in self._bounds:
          if _bound["_type"] == "choice":
              try:
                  [float(val) for val in _bound["_value"]]
              except ValueError:
                  raise ValueError(
                      "GP Tuner supports only numerical values"
                  )
  
      # preallocated memory for X and Y points
      self._params = np.empty(shape=(0, self.dim))
      self._target = np.empty(shape=(0))
  
      # keep track of unique points we have seen so far
      self._cache = {}
  
file_path: nni/nni/algorithms/hpo/gp_tuner/target_space.py
imports: import numpy
  import nni.parameter_expressions
label_desc: Use image node_id 1 to create a new TargetSpace object  with example: obj = TargetSpace(pbounds, random_state)