Search Object

class pyhopper.Search(parameters)[source]
Inherited-members

Parameters

parameters (dict) –

add(candidate)[source]

Adding a guess for the optimal parameters to the search queue. :param candidate: dict representing a subset of the parameters assigned to a value

Parameters

candidate (dict) –

Return type

None

clear_cache()[source]

Forgets all values of already evaluated parameters.

forget_cached(candidate)[source]

Removes the given parameter candidate from the evaluation cache. This might be useful if a parameter value should be reevaluated.

Parameters

candidate (dict) – Parameter candidate to be wiped from the evaluation cache

overwrite_best(candidate, f=None)[source]

Overwrites the current best solution with the provided parameter and objective function value

Parameters
  • candidate (dict) – Parameter values that will be set as current best candidate

  • f (Optional[float]) – Objective function value that will be set as the current best value

Return type

None

run(objective_function, direction='maximize', timeout=None, max_steps=None, seeding_steps=None, seeding_timeout=None, seeding_ratio=0.3, canceler=None, n_jobs=1, quiet=False, ignore_nans=False, mp_backend='auto', enable_rejection_cache=True, callbacks=None, start_temperature=1, end_temperature=0, kwargs=None)[source]
Parameters
  • direction (str) – String defining if the objective function should be minimized or maximize (admissible values are ‘min’,’minimize’, or ‘max’,’maximize’)

  • timeout (Optional[Union[int, float, str]]) –

  • max_steps (Optional[int]) –

  • seeding_steps (Optional[int]) –

  • seeding_timeout (Optional[Union[int, float, str]]) –

  • seeding_ratio (Optional[float]) –

  • callbacks (Optional[Union[callable, list]]) –

  • start_temperature (float) –

  • end_temperature (float) –

sweep(name, candidate_values)[source]
Parameters
  • name (str) –

  • candidate_values (list) –

Return type

None