saealib.TopKBipartitionSet#
- class saealib.TopKBipartitionSet(source='archive', top_ratio=0.5)[ソース]#
ベースクラス:
TrainingSetBinary labels from a sorted bipartition: 1 for top-k, 0 for the rest.
Individuals are sorted by
ctx.comparator.sort_population(best-first), then the topfloor(n * top_ratio)receive label 1 (promising) and the remainder receive label 0 (unpromising).Literature patterns: CPS-MOEA (P2), CSEA / pre-selection (P5).
- パラメータ:
source (str) --
"archive"or"population".top_ratio (float) -- Fraction of individuals labelled as promising. Clamped to
[0, 1]. At least one individual always receives label 1.
- 例外:
ValueError -- If
ctxisNoneorsource="population"withpopulation=None.
Methods
Return bipartition labels based on sorted rank. |
|
Return the training-set contract. |
Method Details
- TopKBipartitionSet.__init__(source='archive', top_ratio=0.5)[ソース]#
- パラメータ:
source (str)
top_ratio (float)
- 戻り値の型:
None
- TopKBipartitionSet.build(archive, population, ctx, candidate_x=None)[ソース]#
Return bipartition labels based on sorted rank.
- パラメータ:
archive (Archive)
population (Population | None)
ctx (OptimizationState | None)
candidate_x (np.ndarray | None)
- 戻り値の型:
- TopKBipartitionSet.contract()#
Return the training-set contract.
- 戻り値の型: