QDpy
Loading...
Searching...
No Matches
repertoire_selection.py File Reference

Select a fixed-size repertoire from already measured candidates. More...

Go to the source code of this file.

Classes

class  qdpy.algorithms.repertoire_selection.DPPRepertoire
 Selected archive members with comparable diversity and quality scores. More...

Namespaces

namespace  qdpy

Functions

 qdpy.algorithms.repertoire_selection.select_dpp (candidates, size, *, embedding=None, quality=None, bandwidth=1., quality_strength=1., ridge=1e-8)
 Pick exactly k alternatives with quality-weighted greedy DPP inference.

Detailed Description

Select a fixed-size repertoire from already measured candidates.

See also
https://arxiv.org/abs/1709.05135

Definition in file repertoire_selection.py.

Function Documentation

◆ select_dpp()

qdpy.algorithms.repertoire_selection.select_dpp ( candidates,
size,
* ,
embedding = None,
quality = None,
bandwidth = 1.,
quality_strength = 1.,
ridge = 1e-8 )

Pick exactly k alternatives with quality-weighted greedy DPP inference.

Parameters
candidatesIterable of measured, eligible alternatives in tie-break order.
sizeNumber to select.
embeddingOptional callable returning a vector for an alternative.
qualityOptional callable returning a scalar with larger values preferred.
bandwidthLength scale of the Gaussian similarity kernel.
quality_strengthMaximum log-weight bonus of quality relative to diversity.
ridgePositive diagonal regularization on the similarity kernel.
Returns
Input indices, selected objects, and the selected kernel scores.
Select a compact repertoire without modifying or reevaluating candidates.

The defaults use each elite's feature vector and its scalar weighted
fitness, resolving named scores and weights when given a container.
Rescale features before selection when axes have different units.
The maximum quality gets zero log penalty and the minimum gets
a penalty of quality_strength. Set
quality_strength to zero for diversity-only selection. An incremental
Cholesky update needs only one kernel column per selected member.

Definition at line 48 of file repertoire_selection.py.