saealib.SklearnGPRSurrogate#

class saealib.SklearnGPRSurrogate(**kwargs)[ソース]#

ベースクラス: SklearnSurrogate

Gaussian Process Regressor surrogate.

Convenience wrapper around SklearnSurrogate using sklearn.gaussian_process.GaussianProcessRegressor. Provides uncertainty estimates via SurrogatePrediction.std, enabling compatibility with acquisition functions such as EI, LCB, PoF, and MaxUncertainty.

パラメータ:

**kwargs (object) -- Keyword arguments forwarded to sklearn.gaussian_process.GaussianProcessRegressor (e.g. kernel, alpha, n_restarts_optimizer).

参照

[19]: Sacks, J., Welch, W. J., Mitchell, T. J., & Wynn, H. P. (1989). Design and analysis of computer experiments. Statistical Science, 4(4), 409-423.

[18]: Rasmussen, C. E., & Williams, C. K. I. (2006). Gaussian Processes for Machine Learning. MIT Press.

Methods

__init__

contract

Return the surrogate model contract.

fit

Fit the surrogate model.

post_fit

Post-fit lifecycle hook; override to inject custom processing.

predict

Predict mean and standard deviation using the GP models.

with_post_fit

Return a copy of this surrogate with fn appended to the post-fit hook.

Method Details

SklearnGPRSurrogate.__init__(**kwargs)[ソース]#
パラメータ:

kwargs (object)

戻り値の型:

None

SklearnGPRSurrogate.contract()#

Return the surrogate model contract.

戻り値の型:

ComponentContract

SklearnGPRSurrogate.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

SklearnGPRSurrogate.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

SklearnGPRSurrogate.predict(test_x)[ソース]#

Predict mean and standard deviation using the GP models.

パラメータ:

test_x (np.ndarray) -- Input data. shape: (n_samples, n_features) or (n_features,)

戻り値:

prediction.value shape: (n_samples, n_obj) prediction.std shape: (n_samples, n_obj)

戻り値の型:

SurrogatePrediction

SklearnGPRSurrogate.with_post_fit(fn)#

Return a copy of this surrogate with fn appended to the post-fit hook.

パラメータ:

fn (callable) -- fn(train_x, train_y, ctx) -> None

戻り値:

Shallow copy with the hook registered.

戻り値の型:

Surrogate