saealib.SklearnXGBSurrogate#
- class saealib.SklearnXGBSurrogate(**kwargs)[ソース]#
ベースクラス:
SklearnSurrogateXGBoost surrogate.
Convenience wrapper around
SklearnSurrogateusingxgboost.XGBRegressor.- パラメータ:
**kwargs (object) -- Keyword arguments forwarded to
xgboost.XGBRegressor.- 例外:
ImportError -- If xgboost 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
- SklearnXGBSurrogate.contract()#
Return the surrogate model contract.
- 戻り値の型:
- SklearnXGBSurrogate.fit(train_x, train_y)#
Fit the surrogate model.
- パラメータ:
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,).
- 戻り値の型:
None
- SklearnXGBSurrogate.post_fit(train_x, train_y, ctx=None)#
Post-fit lifecycle hook; override to inject custom processing.
- パラメータ:
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.
- 戻り値の型:
None
- SklearnXGBSurrogate.predict(test_x)#
Predict using the surrogate model.
- パラメータ:
test_x (np.ndarray) -- Input data. shape: (n_samples, n_features) or (n_features,)
- 戻り値:
prediction.value shape: (n_samples, n_obj) prediction.std is None
- 戻り値の型: