class_docstr: This class wraps an optimizer to allow a human to provide additional guidance to it.
class_docstr_tok: ["This","class","wraps","an","optimizer","to","allow","a","human","to","provide","additional","guidance","to","it","."]
code: def filterHyperparameterSpace(
      self, hyperparameterSpace, filterEntries, root=""
  ):
      if (
          "anyOf" in hyperparameterSpace
          or "oneOf" in hyperparameterSpace
      ):
          if "anyOf" in hyperparameterSpace:
              data = hyperparameterSpace["anyOf"]
          else:
              data = hyperparameterSpace["oneOf"]
  
          newParams = []
          for index, param in enumerate(data):
              newParam = self.filterHyperparameterSpace(
                  param,
                  filterEntries,
                  (root + "." if root else "") + str(index),
              )
              newParams.append(newParam)
          if "anyOf" in hyperparameterSpace:
              return {"anyOf": newParams}
          else:
              return {"oneOf": newParams}
      elif "enum" in hyperparameterSpace:
          return hyperparameterSpace
      elif hyperparameterSpace["type"] == "object":
          newProperties = {}
          for key in hyperparameterSpace["properties"].keys():
              name = root + "." + key
              if name not in filterEntries:
                  config = hyperparameterSpace["properties"][key]
                  newProperty = self.filterHyperparameterSpace(
                      config,
                      filterEntries,
                      (root + "." if root else "") + key,
                  )
                  newProperties[key] = newProperty
          return {"type": "object", "properties": newProperties}
      else:
          return hyperparameterSpace
  
file_path: hypermax/hypermax/algorithms/human_guided_optimizer_wrapper.py
imports: from .optimization_algorithm_base import OptimizationAlgorithmBase
  import hyperopt
  import functools
  import random
  import numpy
  import math
  import numpy.random
  from pprint import pprint
  from hypermax.hyperparameter import Hyperparameter
label_desc: Use image node_id 3 for calling the HumanGuidedOptimizerWrapper obj's underlying member method code with example usage: obj.filterHyperparameterSpace(hyperparameterSpace, filterEntries, root) and returns: dict, dict, hyperparameterSpace, dict, hyperparameterSpace