saealib.LevelBasedSet#
- class saealib.LevelBasedSet(source='population', n_levels=5)[ソース]#
ベースクラス:
TrainingSetMulti-class labels from equal-division of a sorted population (CA-LLSO, P1).
Individuals are sorted by
ctx.comparator.sort_population(best-first), then divided inton_levelsequally-sized groups. The best group receives labeln_levels - 1and the worst group receives label 0. Remainder individuals are appended to the worst (label 0) group.- パラメータ:
source (str) --
"archive"or"population".n_levels (int) -- Number of classification levels (≥ 2).
- 例外:
ValueError -- If
ctxisNoneorsource="population"withpopulation=None.
Methods
Return level labels from equal-size sorted groups. |
|
Return the training-set contract. |
Method Details
- LevelBasedSet.__init__(source='population', n_levels=5)[ソース]#
- パラメータ:
source (str)
n_levels (int)
- 戻り値の型:
None
- LevelBasedSet.build(archive, population, ctx, candidate_x=None)[ソース]#
Return level labels from equal-size sorted groups.
- パラメータ:
archive (Archive)
population (Population | None)
ctx (OptimizationState | None)
candidate_x (np.ndarray | None)
- 戻り値の型:
- LevelBasedSet.contract()#
Return the training-set contract.
- 戻り値の型: