saealib.SurrogateOnlyLoopStage#
- class saealib.SurrogateOnlyLoopStage(algorithm, surrogate_manager, gen_ctrl, cbmanager=None, *, acquisition, feedback_builder=None)[ソース]#
ベースクラス:
StageRun gen_ctrl surrogate-only generations before real evaluation.
Fits the surrogate model once on the current archive, then repeats
gen_ctrltimes: CountGeneration → Ask → SurrogatePredict(refit=False) → Acquisition → Tell. If gen_ctrl is 0 this stage is a no-op.Used by
GenerationBasedStrategyto execute inner surrogate-driven generations before a single true-evaluation generation.- パラメータ:
algorithm (Algorithm) -- Evolutionary algorithm for ask/tell.
surrogate_manager (SurrogateManager) -- Manager used for fitting and prediction.
gen_ctrl (int) -- Number of surrogate-only generations.
cbmanager (CallbackManager or None) -- Forwarded to inner stages for event dispatching.
acquisition (AcquisitionFunction) -- Acquisition function used to score offspring inside the inner loop. Keyword-only so existing positional
SurrogateOnlyLoopStage(algorithm, surrogate_manager, gen_ctrl, cbmanager)calls stay valid.feedback_builder (FeedbackBuilder | None)
Methods
Initialize base Stage attributes. |
|
Return this stage's structural and direct state-access contract. |
|
Execute this stage and return the updated state. |
|
Render as a |
|
Render this stage as a plain-text algorithmic line. |
Method Details
- SurrogateOnlyLoopStage.__init__(algorithm, surrogate_manager, gen_ctrl, cbmanager=None, *, acquisition, feedback_builder=None)[ソース]#
Initialize base Stage attributes.
- パラメータ:
name (str, optional) -- Override the class-level
name.label (str, optional) -- Override the class-level
label.notation (str, optional) -- Override the class-level
notation.algorithm (Algorithm)
surrogate_manager (SurrogateManager)
gen_ctrl (int)
cbmanager (CallbackManager | None)
acquisition (AcquisitionFunction)
feedback_builder (FeedbackBuilder | None)
- 戻り値の型:
None
- SurrogateOnlyLoopStage.contract()[ソース]#
Return this stage's structural and direct state-access contract.
- 戻り値の型:
- SurrogateOnlyLoopStage.execute(state)[ソース]#
Execute this stage and return the updated state.
- パラメータ:
state (OptimizationState) -- Current optimization state.
- 戻り値:
Updated state.
- 戻り値の型:
OptimizationState
- SurrogateOnlyLoopStage.to_pseudocode(*, expand=False, indent=0)[ソース]#
Render as a
\Forloop block when expand is True.- パラメータ:
expand (bool)
indent (int)
- 戻り値の型:
str
- SurrogateOnlyLoopStage.to_text(*, expand=False, indent=0)#
Render this stage as a plain-text algorithmic line.
- パラメータ:
expand (bool)
indent (int)
- 戻り値の型:
str