saealib.SequentialSelection#
- class saealib.SequentialSelection[ソース]#
ベースクラス:
ParentSelectionSequential selection operator.
Methods
Method Details
- SequentialSelection.contract()#
Return the parent-selection contract.
- 戻り値の型:
- SequentialSelection.select(ctx, population, n_pair, n_parents, rng=Generator(PCG64) at 0x7FE0F45F97E0)[ソース]#
Execute sequential selection.
Assign parents sequentially without any fitness-based comparison.
- パラメータ:
ctx (ExecutionContext) -- Optimization context.
population (Population) -- Population to select from.
n_pair (int) -- Number of pairs to select.
n_parents (int) -- Number of parents per pair.
rng (np.random.Generator, optional) -- Random number generator, by default np.random.default_rng()
- 戻り値:
Selected parent indices. shape = (n_pair, n_parents)
- 戻り値の型:
np.ndarray