|
QDpy
|
Choose parents using recent user selections while retaining ordinary grid admission. More...
Public Member Functions | |
| reinit (self) | |
| feedback_rounds (self) | |
| record_feedback (self, selected, *, displayed=None) | |
| Record one display and its selected cells between generations. | |
| parent_probabilities (self) | |
| Inspect the automated parent probability of each currently occupied 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) | |
| _internal_ask (self, base_ind) | |
| Protected Member Functions inherited from qdpy.algorithms.modern._FixedGeneration | |
| _offer_to_grid (self, individual, cell) | |
| _commit_generation (self, evaluated) | |
| _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) | |
Choose parents using recent user selections while retaining ordinary grid admission.
Illuminate a design space between feedback rounds. Call record_feedback() with occupied cells chosen from the current display. Ridge regression estimates the likelihood of a selection from the descriptors (or caller-supplied features). The tabular alternative uses selection counts. Both models use softmax sampling with a uniform exploration component. Fitness and the descriptors that determine cell membership are supplied by the evaluator. :param container: Fixed, parentless, best-only Grid or CVTGrid. :param budget: Native managed evaluation budget. :param dimension: Number of real coordinates in the candidate genome. :param ind_domain: Shared finite lower and upper genome bounds. :param mode: "ridge", "tabular", or "uniform" for a control. :param feedback_window: Most recent rounds used for learning. :param regularization: Positive ridge penalty. :param temperature: Positive softmax temperature in model-score units. :param exploration: Probability of a uniform draw in the automated emitter. :param features: Optional function mapping an evaluated elite to a finite feature vector. :param iso_sigma: Independent Iso+LineDD noise scale. :param line_sigma: Iso+LineDD scale along the direction between sampled elites. :param batch_size: Number of proposals per fixed generation. :param seed: Private proposal seed. :param kwargs: Native algorithm settings, including objective direction.
Definition at line 25 of file preference.py.
|
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.base.QDAlgorithm.
Definition at line 161 of file preference.py.
|
protected |
Prepare a generation for an optimiser that opts into batch feedback.
Reimplemented from qdpy.algorithms.modern._FixedGeneration.
Definition at line 155 of file preference.py.
| qdpy.algorithms.preference.PreferenceLearningMAPElites.feedback_rounds | ( | self | ) |
Return cumulative feedback rounds, including rounds with no selections.
Definition at line 97 of file preference.py.
| qdpy.algorithms.preference.PreferenceLearningMAPElites.parent_probabilities | ( | self | ) |
Inspect the automated parent probability of each currently occupied cell.
Return a mapping in native cell order. The empty archive returns an empty mapping.
Definition at line 150 of file preference.py.
| qdpy.algorithms.preference.PreferenceLearningMAPElites.record_feedback | ( | self, | |
| selected, | |||
| * | , | ||
| displayed = None ) |
Record one display and its selected cells between generations.
| selected | Iterable of indices of the cells the user chose. |
| displayed | Iterable of occupied indices shown to the user. Defaults to all occupied cells. |
Use selected cells as positives and other displayed cells as negatives.
Definition at line 114 of file preference.py.
| qdpy.algorithms.preference.PreferenceLearningMAPElites.reinit | ( | self | ) |
Reset feedback, the parent model, and native evaluation counters.
Reimplemented from qdpy.algorithms.modern._FixedGeneration.
Definition at line 87 of file preference.py.