saealib.SurrogatePrediction¶
- class saealib.SurrogatePrediction(value, std=None, label=None, _tell_f=None, metadata=<factory>)[source]¶
Bases:
objectUnified return type for surrogate model predictions.
- Parameters:
value (ndarray)
std (ndarray | None)
label (ndarray | None)
_tell_f (ndarray | None)
metadata (dict)
- value¶
Predicted values. shape: (n_samples, n_obj)
- Type:
np.ndarray
- std¶
Predicted standard deviations (uncertainty). shape: (n_samples, n_obj). None if the surrogate does not provide uncertainty estimates (e.g., RBF interpolation).
- Type:
np.ndarray or None
- label¶
Predicted class labels. shape: (n_samples,). None unless the surrogate is a classification model.
- Type:
np.ndarray or None
- tell_f¶
Values to assign to offspring.f before calling algorithm.tell(). Falls back to
meanwhen no override is set (_tell_f is None). Pass_tell_f=np.full(..., np.nan)to prevent pbest corruption when the surrogate returns non-objective values (e.g., class probabilities, novelty scores).- Type:
np.ndarray
- metadata¶
Implementation-specific additional information (e.g., SHAP values, gradient estimates).
- Type:
dict
Methods
Method Details
- SurrogatePrediction.__init__(value, std=None, label=None, _tell_f=None, metadata=<factory>)¶
- Parameters:
value (ndarray)
std (ndarray | None)
label (ndarray | None)
_tell_f (ndarray | None)
metadata (dict)
- Return type:
None