class_docstr: Get candidate solutions via random sampling of configurations.
docstr: Maximize acquisition function with random search
  
  Parameters
  ----------
  previous_configs : list[Configuration]
      Not used.
  n_points : int
      Number of configurations to return.
  _sorted : bool, optional
      If True, sort candidates by their acquisition value (descending), by default False
  
  Returns
  -------
  list[tuple[float, Configuration]]
      Candidates with their acquisition function value. (acq value, candidate)
docstr_tok: ["Maximize","acquisition","function","with","random","search","Parameters","--","--","--","--","--","previous_configs",":","list","[","Configuration","]","Not","used",".","n_points",":","int","Number","of","configurations","to","return",".","_sorted",":","bool",",","optional","If","True",",","sort","candidates","by","their","acquisition","value","(","descending",")",",","by","default","False","Returns","--","--","--","-","list","[","tuple","[","float",",","Configuration","]","]","Candidates","with","their","acquisition","function","value",".","(","acq","value",",","candidate",")"]
code: def _maximize(
      self,
      previous_configs: list[Configuration],
      n_points: int,
      _sorted: bool = False,
  ) -> list[tuple[float, Configuration]]:
      """Maximize acquisition function with random search
  
      Parameters
      ----------
      previous_configs : list[Configuration]
          Not used.
      n_points : int
          Number of configurations to return.
      _sorted : bool, optional
          If True, sort candidates by their acquisition value (descending), by default False
  
      Returns
      -------
      list[tuple[float, Configuration]]
          Candidates with their acquisition function value. (acq value, candidate)
      """
      if n_points > 1:
          rand_configs = self._configspace.sample_configuration(
              size=n_points
          )
      else:
          rand_configs = [
              self._configspace.sample_configuration(size=1)
          ]
  
      if _sorted:
          for i in range(len(rand_configs)):
              rand_configs[
                  i
              ].origin = "Acquisition Function Maximizer: Random Search (sorted)"
  
          return self._sort_by_acquisition_value(rand_configs)
      else:
          for i in range(len(rand_configs)):
              rand_configs[
                  i
              ].origin = "Acquisition Function Maximizer: Random Search"
  
          return [
              (0, rand_configs[i]) for i in range(len(rand_configs))
          ]
  
imports: from __future__ import annotations
  from ConfigSpace import Configuration
  from smac.acquisition.maximizer.abstract_acqusition_maximizer import AbstractAcquisitionMaximizer
  from smac.utils.logging import get_logger
label_desc: Use image node_id 1 for calling the RandomSearch obj's underlying member method code with example usage: obj._maximize(previous_configs, n_points, _sorted) and returns: self, unknown