QDpy
Loading...
Searching...
No Matches
qdpy.algorithms.differentiable.CMAMAEGA Class Reference

Adapt coefficients on a basis of objective and descriptor gradients. More...

Inheritance diagram for qdpy.algorithms.differentiable.CMAMAEGA:
qdpy.algorithms.modern.CMAMAE qdpy.algorithms.modern._CMAEmitter 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.differentiable.CMAMEGA

Public Member Functions

 reinit (self)
 centre (self)
 gradient_evaluations (self)
 ask_dqd (self)
 Issue the current centre for a gradient evaluation.
 tell_dqd (self, result)
 Report the gradient evaluation for the pending centre.
 ask_batch (self, size=None)
 tell_batch (self, results)
Public Member Functions inherited from qdpy.algorithms.modern.CMAMAE
 threshold (self, cell)
 Read the search threshold for a descriptor cell.
 search_elites (self)
Public Member Functions inherited from qdpy.algorithms.modern._FixedGeneration
 current_iter (self)
 ask (self)
 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

 _fixed_batch_plan (self, size, evaluate, packed)
 _receive_fixed_batch (self, records, verbose, batch_start_time)
 _commit_generation (self, evaluated)
Protected Member Functions inherited from qdpy.algorithms.modern._CMAEmitter
 _start_fixed_batch (self, size)
 _internal_ask (self, base_ind)
Protected Member Functions inherited from qdpy.algorithms.modern._FixedGeneration
 _offer_to_grid (self, individual, cell)
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.

Detailed Description

Adapt coefficients on a basis of objective and descriptor gradients.

CMA-MAE with a gradient arborescence over the current centre.

Install the optional ``cma`` extra. Each centre evaluation consumes one
candidate slot. Subsequent offspring use the ordinary QDpy evaluator.
The centre and offspring batches each emit an iteration callback.

:param gradient_evaluate: Callable returning a GradientEvaluation.
:param step_size: Multiplier for the rank-weighted centre displacement.
:param sigma0: Initial step size in gradient coefficient coordinates.
:param kwargs: CMA-MAE options, including the reporting grid, bounds,
    budget, initial point, batch size, threshold and archive learning rate.

Definition at line 47 of file differentiable.py.

Member Function Documentation

◆ _commit_generation()

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

Reimplemented from qdpy.algorithms.modern.CMAMAE.

Reimplemented in qdpy.algorithms.differentiable.CMAMEGA.

Definition at line 167 of file differentiable.py.

◆ _fixed_batch_plan()

qdpy.algorithms.differentiable.CMAMAEGA._fixed_batch_plan ( self,
size,
evaluate,
packed )
protected
Select the size and evaluator for the next fixed phase.

Reimplemented from qdpy.algorithms.base.QDAlgorithm.

Definition at line 89 of file differentiable.py.

◆ _receive_fixed_batch()

qdpy.algorithms.differentiable.CMAMAEGA._receive_fixed_batch ( self,
records,
verbose,
batch_start_time )
protected
Commit a generation in proposal order for an opted-in optimiser.

Reimplemented from qdpy.algorithms.modern._FixedGeneration.

Definition at line 146 of file differentiable.py.

◆ ask_batch()

qdpy.algorithms.differentiable.CMAMAEGA.ask_batch ( self,
size = None )
Issue offspring after a successful centre evaluation.

Reimplemented from qdpy.algorithms.modern._FixedGeneration.

Definition at line 108 of file differentiable.py.

◆ ask_dqd()

qdpy.algorithms.differentiable.CMAMAEGA.ask_dqd ( self)

Issue the current centre for a gradient evaluation.

Return the centre, ready for a report through ``tell_dqd()``.

Definition at line 95 of file differentiable.py.

◆ centre()

qdpy.algorithms.differentiable.CMAMAEGA.centre ( self)
Return a copy of the current gradient search point.

Definition at line 80 of file differentiable.py.

◆ gradient_evaluations()

qdpy.algorithms.differentiable.CMAMAEGA.gradient_evaluations ( self)
Number of attempted centre evaluations, including failed calls.

Definition at line 85 of file differentiable.py.

◆ reinit()

qdpy.algorithms.differentiable.CMAMAEGA.reinit ( self)
Reset the centre, coefficient strategy, and gradient evaluation count.

Reimplemented from qdpy.algorithms.modern.CMAMAE.

Reimplemented in qdpy.algorithms.differentiable.CMAMEGA.

Definition at line 71 of file differentiable.py.

◆ tell_batch()

qdpy.algorithms.differentiable.CMAMAEGA.tell_batch ( self,
results )
Commit the pending offspring in proposal order.

Reimplemented from qdpy.algorithms.modern._FixedGeneration.

Definition at line 114 of file differentiable.py.

◆ tell_dqd()

qdpy.algorithms.differentiable.CMAMAEGA.tell_dqd ( self,
result )

Report the gradient evaluation for the pending centre.

Report a GradientEvaluation or ``None`` for a failed centre call.

Definition at line 102 of file differentiable.py.


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