genericROM.Containers.OperatorCompressionData.Regressors.Gpy module

class Gpy(solutionName, options=None)[source]

Bases: OperatorCompressionDataRegression

Class containing a GPy OperatorCompressionData

options

options to pass to GPy

Type:

dict

model

Gaussian process regressor

Type:

GPy regressor

scalerX

scaler for the input of the regression (the parameters of the problem)

Type:

sklearn.preprocessing._data.StandardScaler

scalery

scaler for the output of the regression (the coefficients on the reduced solution on the reducedOrderBasis - reducedCoordinates)

Type:

sklearn.preprocessing._data.StandardScaler

Fit(X, y)[source]

Trains a GaussianProcessRegressor, using GPy, from training data and target values

Parameters:
  • X (np.ndarray) – training data

  • y (np.ndarray) – target values

Returns:

  • sklearn.model_selection._search.GridSearchCV – trained and optimized scikit learn regressor

  • sklearn.preprocessing._data.StandardScaler – scaler trained on input data

  • sklearn.preprocessing._data.StandardScaler – scaler trained on output data

Predict(XTest)[source]

Computes the prediction of the Regressor,taking into account prelearned scalers for input and output

Parameters:

XTest (np.ndarray) – testing data

Returns:

  • np.ndarray – kept eigenvalues, of size (numberOfEigenvalues)

  • np.ndarray – kept eigenvectors, of size (numberOfEigenvalues, numberOfSnapshots)