QDpy
Loading...
Searching...
No Matches
qdpy.algorithms.discount.DiscountModelSearch Class Reference

Rank a CMA generation against a learned continuous discount. More...

Inheritance diagram for qdpy.algorithms.discount.DiscountModelSearch:
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

Public Member Functions

 reinit (self)
 search_elites (self)
 predict_discount (self, descriptors)
 Predict signed discount values at evaluated descriptor vectors.
 threshold (self, cell)
Public Member Functions inherited from qdpy.algorithms.modern._FixedGeneration
 current_iter (self)
 ask (self)
 ask_batch (self, size=None)
 Issue one manual generation in proposal order.
 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

 _start_fixed_batch (self, size)
 _commit_generation (self, evaluated)
Protected Member Functions inherited from qdpy.algorithms.modern._CMAEmitter
 _internal_ask (self, base_ind)
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

Rank a CMA generation against a learned continuous discount.

Native DMS with one CMA emitter and a CPU vector-descriptor model.

Install the optional ``dms`` extra. The fixed Grid or CVTGrid retains each
cell's best genuine evaluation. The MLP predicts a separate discount
in signed quality units and trains once per committed generation.

:param container: One-elite reporting grid.
:param budget: Attempted evaluations per run.
:param x0: Initial decision point.
:param sigma0: Initial CMA search scale.
:param batch_size: Full CMA population size.
:param threshold_min: Initial discount in signed quality units within the model's numeric range.
:param learning_rate: Archive target learning rate.
:param initial_anchors: Maximum sampled centres for model initialisation.
:param empty_anchors: Maximum sampled empty centres per generation.

Definition at line 81 of file discount.py.

Member Function Documentation

◆ _commit_generation()

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

Reimplemented from qdpy.algorithms.modern.CMAMAE.

Definition at line 176 of file discount.py.

◆ _start_fixed_batch()

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

Reimplemented from qdpy.algorithms.modern._CMAEmitter.

Definition at line 146 of file discount.py.

◆ predict_discount()

qdpy.algorithms.discount.DiscountModelSearch.predict_discount ( self,
descriptors )

Predict signed discount values at evaluated descriptor vectors.

Return one signed discount per row after the model has been initialised.

Definition at line 155 of file discount.py.

◆ reinit()

qdpy.algorithms.discount.DiscountModelSearch.reinit ( self)
Reset the discount model and emitter while retaining the result archive.

Reimplemented from qdpy.algorithms.modern.CMAMAE.

Definition at line 126 of file discount.py.

◆ search_elites()

qdpy.algorithms.discount.DiscountModelSearch.search_elites ( self)
Return the result-grid elites that can seed a restart.

Reimplemented from qdpy.algorithms.modern.CMAMAE.

Definition at line 132 of file discount.py.

◆ threshold()

qdpy.algorithms.discount.DiscountModelSearch.threshold ( self,
cell )
Return the discount at a cell centre, or the initial floor before training.

Reimplemented from qdpy.algorithms.modern.CMAMAE.

Definition at line 164 of file discount.py.


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