saealib.SklearnLGBMSurrogate#
- class saealib.SklearnLGBMSurrogate(**kwargs)[source]#
Bases:
SklearnSurrogateLightGBM surrogate.
Convenience wrapper around
SklearnSurrogateusinglightgbm.LGBMRegressor.- Parameters:
**kwargs (object) – Keyword arguments forwarded to
lightgbm.LGBMRegressor.- Raises:
ImportError – If lightgbm is not installed.
Methods
Return the surrogate model contract. |
|
Fit the surrogate model. |
|
Post-fit lifecycle hook; override to inject custom processing. |
|
Predict using the surrogate model. |
|
Return a copy of this surrogate with |
Method Details
- SklearnLGBMSurrogate.contract()#
Return the surrogate model contract.
- Return type:
- SklearnLGBMSurrogate.fit(train_x, train_y)#
Fit the surrogate model.
- Parameters:
train_x (np.ndarray) – Training input data. shape: (n_samples, n_features)
train_y (np.ndarray) – Training output data. shape: (n_samples, n_obj) or (n_samples,).
- Return type:
None
- SklearnLGBMSurrogate.post_fit(train_x, train_y, ctx=None)#
Post-fit lifecycle hook; override to inject custom processing.
- Parameters:
train_x (np.ndarray) – Training input data used for this fit. shape: (n_samples, n_features)
train_y (np.ndarray) – Training output data used for this fit. shape: (n_samples, n_obj)
ctx (OptimizationState or None, optional) – Current optimization context.
- Return type:
None
- SklearnLGBMSurrogate.predict(test_x)#
Predict using the surrogate model.
- Parameters:
test_x (np.ndarray) – Input data. shape: (n_samples, n_features) or (n_features,)
- Returns:
prediction.value shape: (n_samples, n_obj) prediction.std is None
- Return type: