metaheuristic_designer.strategies.bayesian_optimization.bayesian_optimization module#
Bayesian Optimization strategy.
- class BayesianOptimization(initializer, objfunc, parent_sel=None, name='Bayesian Optimization', rng=None, **kwargs)[source]#
Bases:
PopulationBasedStrategyBayesian Optimization using a Gaussian Process surrogate.
This strategy replaces the usual perturbation operator with a
BOOperator, which fits a GP model to the current population and uses an acquisition function to propose new candidates.- Parameters:
- initializerInitializer
Population initializer (provides the starting points).
- parent_selParentSelection, optional
Parent selection method (default: identity).
- namestr, optional
Display name (default
"Bayesian Optimization").- **kwargs
Forwarded to
BOOperator(e.g.,batch_size,max_samples,kernel).
- Attributes:
paramsAccess parameter values by attribute-style lookup.
population_sizeGets the amount of individuals in the population.
- Parameters:
initializer (Initializer)
objfunc (ObjectiveFunc)
parent_sel (ParentSelection)
name (str)
rng (Optional[RNGLike])
Methods
extra_report()Hook called at the end of the optimization (intended for subclasses).
extra_step_info()Hook called after each generation (intended for subclasses).
gather_parameters()Collect the current parameters from all sub-components.
get_params()Return a copy of the current parameter dictionary.
get_state()Gets the current state of the search strategy as a dictionary.
initialize(objfunc)Initializes the optimization search strategy.
step(prev_population, objfunc)Performs a single iteration of the algorithm on a given population.
store_kwargs([progress])Store keyword arguments and evaluate them at the given progress.
update(progress)Advances the state of the search by one iteration.
update_kwargs([progress])Add or replace parameters and immediately evaluate them.
reset