pygx.algo.evolution.selectors¶
Common selectors for evolutionary algorithms.
selectors
¶
Common selectors for evolutionary algorithms.
Random
¶
Sample
¶
Sample(
n: int | float | None = None,
weights: Operation | Callable[..., list[float]] | None = None,
**kwargs
)
Bases: Selector
Sample N items from a weighting function.
Source code in pygx/algo/evolution/_selectors.py
Proportional
¶
Proportional(
n: int | float | None = None,
weights: Operation | Callable[..., list[float]] | None = None,
**kwargs
)
Bases: Selector
Select N items proportional to the input weights.
Source code in pygx/algo/evolution/_selectors.py
Top
¶
Bottom
¶
First
¶
Last
¶
num_output_spec
¶
Returns the value spec for the number of elements in the output.
Source code in pygx/algo/evolution/_selectors.py
compute_num_output
¶
Returns the number of output.
Source code in pygx/algo/evolution/_selectors.py
options: show_root_heading: false show_root_toc_entry: false members_order: source heading_level: 2