saealib.PreSelectionStrategy#
- class saealib.PreSelectionStrategy(n_candidates, n_select)[source]#
Bases:
OptimizationStrategyPre-selection strategy.
Generates
n_candidatesoffspring, scores them with the surrogate, and true-evaluates only the topn_selectcandidates.- Parameters:
n_candidates (int) – Number of candidates to generate and score with the surrogate.
n_select (int) – Number of top-scoring candidates to evaluate with the true objective function.
Methods
Initialize PreSelectionStrategy. |
|
Build the canonical pre-selection strategy graph. |
|
Return the strategy's high-level Pipeline description. |
|
Return the strategy contract. |
|
Generate a large candidate pool, screen with surrogate, true-evaluate top-k. |
Method Details
- PreSelectionStrategy.__init__(n_candidates, n_select)[source]#
Initialize PreSelectionStrategy.
- Parameters:
n_candidates (int) – Number of candidates to generate and score with the surrogate.
n_select (int) – Number of top-scoring candidates to evaluate with the true objective function.
- PreSelectionStrategy.build_graph(provider)[source]#
Build the canonical pre-selection strategy graph.
- Parameters:
provider (ComponentProvider)
- Return type:
- PreSelectionStrategy.build_pipeline(provider)#
Return the strategy’s high-level Pipeline description.
- Parameters:
provider (ComponentProvider)
- Return type:
- PreSelectionStrategy.contract()#
Return the strategy contract.
- Return type:
- PreSelectionStrategy.step(ctx, provider)[source]#
Generate a large candidate pool, screen with surrogate, true-evaluate top-k.
Rebuilds the pipeline each call so component/parameter changes take effect immediately.
- Parameters:
ctx (OptimizationState) – Current optimization context.
provider (ComponentProvider) – Component provider.
- Returns:
Updated state after one generation step.
- Return type:
OptimizationState