saealib.SurrogatePredictStage#
- class saealib.SurrogatePredictStage(surrogate_manager, cbmanager=None, *, refit=True)[ソース]#
ベースクラス:
StagePredict offspring with the surrogate model.
Reads
state.offspring, writes the batched prediction tostate.predictions. Also assigns predicted objective valuesTellStagereceives feedback from a separate policy. Does not compute acquisition scores; pair withAcquisitionStagefor that.- パラメータ:
surrogate_manager (SurrogateManager) -- Manager that coordinates fit / predict.
cbmanager (CallbackManager or None) -- If provided, SurrogateStartEvent and SurrogateEndEvent are dispatched.
refit (bool) -- Passed directly to
surrogate_manager.predict(). Set toFalseinside inner loops where the surrogate was already fitted by an explicitSurrogateFitStage.
Methods
Initialize base Stage attributes. |
|
Return this stage's structural and direct state-access contract. |
|
Execute this stage and return the updated state. |
|
Render this stage as a LaTeX algorithmic line. |
|
Render this stage as a plain-text algorithmic line. |
Method Details
- SurrogatePredictStage.__init__(surrogate_manager, cbmanager=None, *, refit=True)[ソース]#
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.surrogate_manager (SurrogateManager)
cbmanager (CallbackManager | None)
refit (bool)
- 戻り値の型:
None
- SurrogatePredictStage.contract()[ソース]#
Return this stage's structural and direct state-access contract.
- 戻り値の型:
- SurrogatePredictStage.execute(state)[ソース]#
Execute this stage and return the updated state.
- パラメータ:
state (OptimizationState) -- Current optimization state.
- 戻り値:
Updated state.
- 戻り値の型:
OptimizationState
- SurrogatePredictStage.to_pseudocode(*, expand=False, indent=0)#
Render this stage as a LaTeX algorithmic line.
- パラメータ:
expand (bool) -- If True and this stage has sub-stages, recursively expand them.
indent (int) -- Current indentation level (number of
\Stateindent steps).
- 戻り値:
LaTeX algorithmic fragment.
- 戻り値の型:
str
- SurrogatePredictStage.to_text(*, expand=False, indent=0)#
Render this stage as a plain-text algorithmic line.
- パラメータ:
expand (bool)
indent (int)
- 戻り値の型:
str