GaussianProcessRegressionResult

class GaussianProcessRegressionResult(*args)

Gaussian process regression (aka kriging) result.

Warning

This class is experimental and likely to be modified in future releases. To use it, import the openturns.experimental submodule.

Refer to Gaussian process regression.

Parameters:
gpfitResultGaussianProcessFitterResult

Structure result of a gaussian process fitter.

covarianceCoefficients2-d sequence of float

The \vect{\gamma} defined in (3).

Methods

getBasis()

Accessor to the collection of basis.

getClassName()

Accessor to the object's name.

getCovarianceCoefficients()

Accessor to the covariance coefficients.

getCovarianceModel()

Accessor to the covariance model.

getInputSample()

Accessor to the input sample.

getLinearAlgebraMethod()

Accessor to the linear algebra method used to fit.

getMetaModel()

Accessor to the metamodel.

getName()

Accessor to the object's name.

getNoise()

Accessor to the Gaussian process.

getOptimalLogLikelihood()

Accessor to the optimal log-likelihood of the model.

getOutputSample()

Accessor to the output sample.

getRegressionMatrix()

Accessor to the regression matrix.

getTrendCoefficients()

Accessor to the trend coefficients.

hasName()

Test if the object is named.

setInputSample(sampleX)

Accessor to the input sample.

setMetaModel(metaModel)

Accessor to the metamodel.

setName(name)

Accessor to the object's name.

setOutputSample(sampleY)

Accessor to the output sample.

getRelativeErrors

getResiduals

setRelativeErrors

setResiduals

Notes

The structure is usually created by the method run(), and obtained thanks to the getResult() method.

Refer to the documentation of GaussianProcessRegression to get details on the notations.

Examples

Create the model \model: \Rset \mapsto \Rset and the samples:

>>> import openturns as ot
>>> import openturns.experimental as otexp
>>> g = ot.SymbolicFunction(['x'],  ['x * sin(x)'])
>>> sampleX = [[1.0], [2.0], [3.0], [4.0], [5.0], [6.0]]
>>> sampleY = g(sampleX)

Create the algorithm:

>>> basis = ot.Basis([ot.SymbolicFunction(['x'], ['x']), ot.SymbolicFunction(['x'], ['x^2'])])
>>> covarianceModel = ot.GeneralizedExponential([2.0], 2.0)
>>> fit_algo = otexp.GaussianProcessFitter(sampleX, sampleY, covarianceModel, basis)
>>> fit_algo.run()

Create the interpolating Gaussian process approximation:

>>> algo = otexp.GaussianProcessRegression(fit_algo.getResult())
>>> algo.run()

Get the resulting interpolating metamodel \metaModel:

>>> result = algo.getResult()
>>> metaModel = result.getMetaModel()
__init__(*args)
getBasis()

Accessor to the collection of basis.

Returns:
basisBasis

Functional basis to estimate the trend: (\varphi_j)_{1 \leq j \leq b}: \Rset^\inputDim
\rightarrow \Rset.

Notes

If the trend is not estimated, the basis is empty. The same basis is used for each marginal output.

getClassName()

Accessor to the object’s name.

Returns:
class_namestr

The object class name (object.__class__.__name__).

getCovarianceCoefficients()

Accessor to the covariance coefficients.

Returns:
covCoeffSample

The \vect{\gamma} defined in (3).

getCovarianceModel()

Accessor to the covariance model.

Returns:
covModelCovarianceModel

The covariance model of the Gaussian process \vect{W}.

getInputSample()

Accessor to the input sample.

Returns:
inputSampleSample

The input sample.

getLinearAlgebraMethod()

Accessor to the linear algebra method used to fit.

Returns:
linAlgMethodint

The used linear algebra method to fit the model:

  • otexp.GaussianProcessFitterResult.LAPACK or 0: using LAPACK to fit the model,

  • otexp.GaussianProcessFitterResult.HMAT or 1: using HMAT to fit the model.

getMetaModel()

Accessor to the metamodel.

Returns:
metaModelFunction

Metamodel.

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

getNoise()

Accessor to the Gaussian process.

Returns:
processProcess

The Gaussian process \vect{W} its the optimized parameters.

getOptimalLogLikelihood()

Accessor to the optimal log-likelihood of the model.

Returns:
optimalLogLikelihoodfloat

The value of the log-likelihood corresponding to the model.

getOutputSample()

Accessor to the output sample.

Returns:
outputSampleSample

The output sample.

getRegressionMatrix()

Accessor to the regression matrix.

Returns:
processMatrix

Returns the regression matrix.

Notes

The regression matrix, e.g the evaluation of the basis function upon the input design sample. It contains \sampleSize \times \outputDim lines and as many column as the size of the functional basis. The column k is defined as:

\left(\varphi_k(\vect{x}_1), \dots,\varphi_k(\vect{x}_\sampleSize) \right).

getTrendCoefficients()

Accessor to the trend coefficients.

Returns:
trendCoefsequence of float

The trend coefficients vectors (\vect{\beta}^1, \dots, \vect{\beta}^{\outputDim}) as a Point.

Notes

As the same basis is used for each marginal output, each \vect{\beta}^\ell vector is of dimension b, the size of the functional basis.

hasName()

Test if the object is named.

Returns:
hasNamebool

True if the name is not empty.

setInputSample(sampleX)

Accessor to the input sample.

Parameters:
inputSampleSample

The input sample.

setMetaModel(metaModel)

Accessor to the metamodel.

Parameters:
metaModelFunction

Metamodel.

setName(name)

Accessor to the object’s name.

Parameters:
namestr

The name of the object.

setOutputSample(sampleY)

Accessor to the output sample.

Parameters:
outputSampleSample

The output sample.

Examples using the class

Gaussian Process Regression vs KrigingAlgorithm

Gaussian Process Regression vs KrigingAlgorithm

Gaussian Process Regression: multiple input dimensions

Gaussian Process Regression: multiple input dimensions

Gaussian Process Regression : quick-start

Gaussian Process Regression : quick-start

Gaussian Process-based active learning for reliability

Gaussian Process-based active learning for reliability

Advanced Gaussian process regression

Advanced Gaussian process regression

Gaussian Process Regression: choose an arbitrary trend

Gaussian Process Regression: choose an arbitrary trend

Gaussian Process Regression: choose a polynomial trend on the beam model

Gaussian Process Regression: choose a polynomial trend on the beam model

Gaussian Process Regression : cantilever beam model

Gaussian Process Regression : cantilever beam model

Gaussian Process Regression: surrogate model with continuous and categorical variables

Gaussian Process Regression: surrogate model with continuous and categorical variables

Gaussian Process Regression: choose a polynomial trend

Gaussian Process Regression: choose a polynomial trend

Gaussian Process Regression: use an isotropic covariance kernel

Gaussian Process Regression: use an isotropic covariance kernel

Gaussian Process Regression : generate trajectories from the metamodel

Gaussian Process Regression : generate trajectories from the metamodel

Gaussian Process Regression: metamodel of the Branin-Hoo function

Gaussian Process Regression: metamodel of the Branin-Hoo function

Example of multi output Gaussian Process Regression on the fire satellite model

Example of multi output Gaussian Process Regression on the fire satellite model

Sequentially adding new points to a Gaussian Process metamodel

Sequentially adding new points to a Gaussian Process metamodel