autoemulate.emulators.gradient_boosting#

class GradientBoosting(loss='squared_error', learning_rate=0.1, n_estimators=100, max_depth=3, min_samples_split=2, min_samples_leaf=1, subsample=1.0, max_features=None, ccp_alpha=0.0, n_iter_no_change=None, random_state=None)[source]#

Bases: BaseEstimator, RegressorMixin

Gradient Boosting Emulator.

Wraps Gradient Boosting regression from scikit-learn.

fit(X, y)[source]#

Fits the emulator to the data.

Parameters:
  • X ({array-like, sparse matrix}, shape (n_samples, n_features)) – The training input samples.

  • y (array-like, shape (n_samples,) or (n_samples, n_outputs)) – The target values (real numbers).

Returns:

self – Returns self.

Return type:

object

predict(X)[source]#

Predicts the output of the emulator for a given input.

Parameters:

X ({array-like, sparse matrix}, shape (n_samples, n_features)) – The input samples.

Returns:

y – The predicted values.

Return type:

ndarray of shape (n_samples, n_features)

get_grid_params(search_type='random')[source]#

Returns the grid parameters of the emulator.