autoemulate.emulators.polynomials#

class SecondOrderPolynomial(degree=2)[source]#

Bases: BaseEstimator, RegressorMixin

Second order polynomial emulator.

Creates a second order polynomial emulator. This is a linear model including all main effects, interactions and quadratic terms.

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.