deephyper.hpo.ArgMaxEstSelection#

class deephyper.hpo.ArgMaxEstSelection(problem: HpProblem, random_state: int | None = None, model: str | sklearn.base.BaseEstimator = 'RF', model_kwargs: dict[str, Any] | None = None, optimizer: Literal['sampling', 'ga'] = 'ga', filter_failures: Literal['mean', 'max'] = 'mean', model_grid_search: bool = True, model_grid_search_period: int = 100, model_grid_search_score: Literal['r2', 'gaussian_nll'] | None = None, noisy_objective: bool = False)[source]#

Bases: SolutionSelection

Selects solution using a surrogate model and acquisition optimizer.

This strategy fits a surrogate model to the observed data and uses optimization to find the configuration that maximizes the predicted objective.

Methods

acq_func

evaluate

fit_and_tune_model

get_parameter_grid

optimize_ga

Optimize using genetic algorithm.

optimize_sampling

Optimize using random sampling.

update

Update the solution based on new job results.

optimize_ga(n_samples: int = 10000, pop_size: int = 100, xtol: float = 1e-08, ftol: float = 1e-06, period: int = 30, n_max_gen: int = 1000) Tuple[Any, float][source]#

Optimize using genetic algorithm.

Parameters:
  • n_samples – Number of initial samples

  • pop_size – Population size for GA

  • xtol – Tolerance for parameter convergence

  • ftol – Tolerance for objective convergence

  • period – Period for convergence checking

  • n_max_gen – Maximum number of generations

Returns:

Tuple of (best_parameters, objective_value)

optimize_sampling(n_samples: int = 10000) Tuple[Any, float, float, float][source]#

Optimize using random sampling.

Parameters:

n_samples – Number of random samples to evaluate

Returns:

Tuple of (best_parameters, objective_mean, std_al, std_ep)

update(jobs: Sequence[HPOJob]) None#

Update the solution based on new job results.

Parameters:

jobs – Sequence of completed HPO jobs