saealib.PreSelectionStrategy#

class saealib.PreSelectionStrategy(n_candidates, n_select)[source]#

Bases: OptimizationStrategy

Pre-selection strategy.

Generates n_candidates offspring, scores them with the surrogate, and true-evaluates only the top n_select candidates.

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

__init__

Initialize PreSelectionStrategy.

build_graph

Build the canonical pre-selection strategy graph.

build_pipeline

Return the strategy's high-level Pipeline description.

contract

Return the strategy contract.

step

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:

ComponentGraph

PreSelectionStrategy.build_pipeline(provider)#

Return the strategy’s high-level Pipeline description.

Parameters:

provider (ComponentProvider)

Return type:

Pipeline

PreSelectionStrategy.contract()#

Return the strategy contract.

Return type:

ComponentContract

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