class_docstr: Perturb parameters for exploration
  
  Given a set of parameter values, this exploration object randomly perturb
  them with a given ``factor``. It will multiply the value of a dimension
  with probability 0.5, otherwise divide it. Values are clamped to limits of the
  search space when exceeding it. For categorical dimensions, a new value is sampled
  from categories with equal probability for each categories.
  
  Parameters
  ----------
  factor: float, optional
      Factor used to multiply or divide with probability 0.5 the values of the dimensions.
      Only applies to real or int dimensions. Integer dimensions are pushed to next integer
      if ``new_value > value`` otherwise reduced to previous integer, where new_value is
      the result of either ``value * factor`` or ``value / factor``.
      Categorial dimensions are sampled from categories randomly. Default: 1.2
  volatility: float, optional
      If the results of ``value * factor`` or ``value / factor`` exceeds the
      limit of the search space, the new value is set to limit and then added
      or subtracted ``abs(normal(0, volatility))`` (if at lower limit or upper limit).
      Default: 0.0001
  
  Notes
  -----
  Categorical dimensions with special probabilities are not supported for now. A category
  with be sampled with equal probability for each categories.
docstr: Execute perturbation
  
  Given a set of parameter values, this exploration object randomly perturb them with a given
  ``factor``. It will multiply the value of a dimension with probability 0.5, otherwise divide
  it. Values are clamped to limits of the search space when exceeding it. For categorical
  dimensions, a new value is sampled from categories with equal probability for each
  categories.
  
  Parameters
  ----------
  rng: numpy.random.Generator
      A random number generator. It is not contained in ``BaseExplore`` because the explore
      class must be stateless.
  space: Space
      The search space optimized by the algorithm.
  params: dict
      Dictionary representing the parameters of the current trial under examination
      (`trial.params`).
  
  Returns
  -------
  ``dict``
      The new set of parameters for the trial to be branched.
docstr_tok: ["Execute","perturbation","Given","a","set","of","parameter","values",",","this","exploration","object","randomly","perturb","them","with","a","given","``","factor","``",".","It","will","multiply","the","value","of","a","dimension","with","probability","0.5",",","otherwise","divide","it",".","Values","are","clamped","to","limits","of","the","search","space","when","exceeding","it",".","For","categorical","dimensions",",","a","new","value","is","sampled","from","categories","with","equal","probability","for","each","categories",".","Parameters","--","--","--","--","--","rng",":","numpy.random.Generator","A","random","number","generator",".","It","is","not","contained","in","``","BaseExplore","``","because","the","explore","class","must","be","stateless",".","space",":","Space","The","search","space","optimized","by","the","algorithm",".","params",":","dict","Dictionary","representing","the","parameters","of","the","current","trial","under","examination","(","`","trial.params","`",")",".","Returns","--","--","--","-","``","dict","``","The","new","set","of","parameters","for","the","trial","to","be","branched","."]
code: def __call__(self, rng, space, params):
      """Execute perturbation
  
      Given a set of parameter values, this exploration object randomly perturb them with a given
      ``factor``. It will multiply the value of a dimension with probability 0.5, otherwise divide
      it. Values are clamped to limits of the search space when exceeding it. For categorical
      dimensions, a new value is sampled from categories with equal probability for each
      categories.
  
      Parameters
      ----------
      rng: numpy.random.Generator
          A random number generator. It is not contained in ``BaseExplore`` because the explore
          class must be stateless.
      space: Space
          The search space optimized by the algorithm.
      params: dict
          Dictionary representing the parameters of the current trial under examination
          (`trial.params`).
  
      Returns
      -------
      ``dict``
          The new set of parameters for the trial to be branched.
  
      """
  
      new_params = {}
      params = flatten(params)
      for dim in space.values():
          dim_value = params[dim.name]
          if dim.type == "real":
              dim_value = self.perturb_real(
                  rng, dim_value, dim.interval()
              )
          elif dim.type == "integer":
              dim_value = self.perturb_int(
                  rng, dim_value, dim.interval()
              )
          elif dim.type == "categorical":
              dim_value = self.perturb_cat(rng, dim_value, dim)
          elif dim.type == "fidelity":
              # do nothing
              pass
          else:
              raise ValueError(f"Unsupported dimension type {dim.type}")
  
          new_params[dim.name] = dim_value
  
      return unflatten(new_params)
  
imports: import numpy
  from orion.core.utils import GenericFactory
  from orion.core.utils.flatten import flatten, unflatten
label_desc: Use image node_id 5 for calling the PerturbExplore obj's underlying member method code with example usage: obj.__call__(rng, space, params) and returns: unflatten