QDpy
Loading...
Searching...
No Matches
qdpy.algorithms.conditional_bayesian.ConditionalBayesianQD Class Reference

Reuse HiGeME's conditional schema with competitive Bayesian infill. More...

Inheritance diagram for qdpy.algorithms.conditional_bayesian.ConditionalBayesianQD:
qdpy.algorithms.constrained.HiGeME qdpy.algorithms.modern._FixedGeneration qdpy.algorithms.base.QDAlgorithm qdpy.algorithms.base.QDAlgorithmLike qdpy.base.Summarisable qdpy.base.Saveable qdpy.base.Copyable qdpy.base.CreatableFromConfig qdpy.algorithms.bayesian_deep_qd.BayesianDeepQD

Public Member Functions

 reinit (self)
 configuration_attempts (self)
 configuration_observations (self)
 surrogate_evaluations (self)
 model_fits (self)
 modelled_proposals (self)
Public Member Functions inherited from qdpy.algorithms.constrained.HiGeME
 ask_batch (self, size=None)
 decode (self, candidate)
 Decode a candidate into the design visible to the evaluator.
Public Member Functions inherited from qdpy.algorithms.modern._FixedGeneration
 current_iter (self)
 ask (self)
 tell_batch (self, results)
 Apply results from the outstanding manual generation.
 optimise (self, *args, **kwargs)
Public Member Functions inherited from qdpy.algorithms.base.QDAlgorithm
Union[str, Sequence[float]] optimisation_task (self)
None optimisation_task (self, Union[str, Sequence[float]] optimisation_task)
int nb_suggestions (self)
int nb_suggestions_in_iteration (self)
int nb_evaluations (self)
int nb_evaluations_in_iteration (self)
int nb_updated (self)
int nb_updated_in_iteration (self)
int batch_size (self)
Union[int, float] nb_max_iter (self)
None tell_container_entries (self, Optional[Container] cont=None)
IndividualLike best (self)
None add_callback (self, str event, Callable fn)
Public Member Functions inherited from qdpy.base.Summarisable
Mapping[str, Any] __get_summary_state__ (self)
str summary (self, Optional[int] max_depth=None, Optional[int] max_entry_length=250)
Public Member Functions inherited from qdpy.base.Saveable
Mapping[str, Any] __get_saved_state__ (self)
None save (self, str output_path, str output_type="pickle")
Public Member Functions inherited from qdpy.base.CreatableFromConfig
Any from_config (cls, Mapping[str, Any] config, **Any kwargs)

Protected Member Functions

 _pool (self, branch, observations)
 _start_fixed_batch (self, size)
 _prepare_promotions (self, size)
 _internal_ask (self, base_ind)
 _commit_generation (self, evaluated)
Protected Member Functions inherited from qdpy.algorithms.modern._FixedGeneration
 _offer_to_grid (self, individual, cell)
 _receive_fixed_batch (self, records, verbose, batch_start_time)
Protected Member Functions inherited from qdpy.algorithms.base.QDAlgorithm
 _check_archive_weights (self)
None _attach_evaluation (self, ind, fitness, features, scores, elapsed)
Tuple[MutableMapping[str, Any], bool] _tell_before_container_update (self, IndividualLike individual)
 Read pre-admission state for optimiser feedback.
None _tell_after_container_update (self, IndividualLike individual, bool added, Mapping[str, Any] xattr={})
 Account for a completed tell and send feedback.
None _internal_tell (self, IndividualLike individual, bool added_to_container, Mapping[str, Any] xattr={})
IndividualLike _internal_best (self)
bool _verify_if_finished_iteration (self, float batch_start_time)
None _transfer_suggestion (self, IndividualLike individual, IndividualLike evaluated)
 Transfer coordinator-side metadata when evaluation returns a new object.
 _fixed_batch_plan (self, size, evaluate, packed)

Detailed Description

Reuse HiGeME's conditional schema with competitive Bayesian infill.

Fit per-configuration surrogates and promote exact evaluations into a shared grid.

Each cheap pool uses a mix of uniform designs and perturbations of prior
measurements from that configuration. Assign each predicted design to
its posterior-mean descriptor cell. Rank proposals by feasibility-weighted
expected improvement over the measured cell incumbent. Select at most
one predicted winner per cell per batch before filling unused slots.
Only measured feasible designs are offered to the reporting grid.

:param container: Empty best-only Grid or CVTGrid with one objective.
:param budget: Total exact evaluation attempts.
:param variables: Ordered mapping from variable names to HiGeME gene specifications.
:param configurations: Allowed ConditionalConfiguration objects.
:param initial_samples: Space-filling draws per configuration before fitting.
:param surrogate_budget: Candidate prediction attempts per fitted configuration and batch.
:param quality_floor: Optional raw fitness reference for empty cells. By
    default use the worst signed fitness measured so far.
:param exploration_probability: Chance of a fresh random draw after warm-up.
:param real_length_scale: Gaussian length scale on normalized real genes.
:param discrete_correlation: Kernel factor for mismatched discrete genes.
:param batch_size: Total exact proposals per acquisition update.
:param seed: Private random seed.
:param optimisation_task: Single objective direction or weight. Defaults
    to the supplied archive's direction when set.

Definition at line 56 of file conditional_bayesian.py.

Member Function Documentation

◆ _commit_generation()

qdpy.algorithms.conditional_bayesian.ConditionalBayesianQD._commit_generation ( self,
evaluated )
protected
Offer validated measurements to a native grid in proposal order.

Reimplemented from qdpy.algorithms.constrained.HiGeME.

Definition at line 265 of file conditional_bayesian.py.

◆ _internal_ask()

qdpy.algorithms.conditional_bayesian.ConditionalBayesianQD._internal_ask ( self,
base_ind )
protected
Internal ask method. To be implemented by subclasses.

Parameters
----------
:param base_ind: IndividualLike
    The base (empty) individual object. The `_internal_ask` method must change
    this object, by filling out the genome and providing other information.

Returns
-------
out: IndividualLike
    The suggested individual.

Reimplemented from qdpy.algorithms.constrained.HiGeME.

Definition at line 248 of file conditional_bayesian.py.

◆ _pool()

qdpy.algorithms.conditional_bayesian.ConditionalBayesianQD._pool ( self,
branch,
observations )
protected
Draw cheap trials from between and around prior exact designs.

Definition at line 157 of file conditional_bayesian.py.

◆ _prepare_promotions()

qdpy.algorithms.conditional_bayesian.ConditionalBayesianQD._prepare_promotions ( self,
size )
protected
Queue model-based proposals for the next fixed batch.

Reimplemented in qdpy.algorithms.bayesian_deep_qd.BayesianDeepQD.

Definition at line 230 of file conditional_bayesian.py.

◆ _start_fixed_batch()

qdpy.algorithms.conditional_bayesian.ConditionalBayesianQD._start_fixed_batch ( self,
size )
protected
Prepare a generation for an optimiser that opts into batch feedback.

Reimplemented from qdpy.algorithms.modern._FixedGeneration.

Definition at line 225 of file conditional_bayesian.py.

◆ configuration_attempts()

qdpy.algorithms.conditional_bayesian.ConditionalBayesianQD.configuration_attempts ( self)
Return exact proposals in configuration order, including failed evaluations.

Definition at line 120 of file conditional_bayesian.py.

◆ configuration_observations()

qdpy.algorithms.conditional_bayesian.ConditionalBayesianQD.configuration_observations ( self)
Return counts of finite observations used by each configuration model.

Definition at line 125 of file conditional_bayesian.py.

◆ model_fits()

qdpy.algorithms.conditional_bayesian.ConditionalBayesianQD.model_fits ( self)
Return the number of per-configuration model refits.

Definition at line 135 of file conditional_bayesian.py.

◆ modelled_proposals()

qdpy.algorithms.conditional_bayesian.ConditionalBayesianQD.modelled_proposals ( self)
Return exact proposals chosen by the surrogate.

Definition at line 140 of file conditional_bayesian.py.

◆ reinit()

qdpy.algorithms.conditional_bayesian.ConditionalBayesianQD.reinit ( self)
Reset models, proposal streams, and conditional evaluation counts.

Reimplemented from qdpy.algorithms.constrained.HiGeME.

Reimplemented in qdpy.algorithms.bayesian_deep_qd.BayesianDeepQD.

Definition at line 111 of file conditional_bayesian.py.

◆ surrogate_evaluations()

qdpy.algorithms.conditional_bayesian.ConditionalBayesianQD.surrogate_evaluations ( self)
Return the number of distinct cheap predictions across all batches.

Definition at line 130 of file conditional_bayesian.py.


The documentation for this class was generated from the following file: