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","."]
docstr: Creates a random point within the bounds of the space.
  
  Returns
  -------
  numpy array
      one groupe of parameter
docstr_tok: ["Creates","a","random","point","within","the","bounds","of","the","space",".","Returns","--","--","--","-","numpy","array","one","groupe","of","parameter"]
code: def random_sample(self):
      """
      Creates a random point within the bounds of the space.
  
      Returns
      -------
      numpy array
          one groupe of parameter
      """
      params = np.empty(self.dim)
      for col, _bound in enumerate(self._bounds):
          if _bound["_type"] == "choice":
              params[col] = parameter_expressions.choice(
                  _bound["_value"], self._random_state
              )
          elif _bound["_type"] == "randint":
              params[col] = self._random_state.randint(
                  _bound["_value"][0], _bound["_value"][1], size=1
              )
          elif _bound["_type"] == "uniform":
              params[col] = parameter_expressions.uniform(
                  _bound["_value"][0],
                  _bound["_value"][1],
                  self._random_state,
              )
          elif _bound["_type"] == "quniform":
              params[col] = parameter_expressions.quniform(
                  _bound["_value"][0],
                  _bound["_value"][1],
                  _bound["_value"][2],
                  self._random_state,
              )
          elif _bound["_type"] == "loguniform":
              params[col] = parameter_expressions.loguniform(
                  _bound["_value"][0],
                  _bound["_value"][1],
                  self._random_state,
              )
          elif _bound["_type"] == "qloguniform":
              params[col] = parameter_expressions.qloguniform(
                  _bound["_value"][0],
                  _bound["_value"][1],
                  _bound["_value"][2],
                  self._random_state,
              )
  
      return params
  
file_path: nni/nni/algorithms/hpo/gp_tuner/target_space.py
imports: import numpy
  import nni.parameter_expressions
label_desc: Use image node_id 12 for calling the TargetSpace obj's underlying member method code with example usage: obj.random_sample() and returns: params