GaussianProcessFitterResult¶
- class GaussianProcessFitterResult(*args)¶
- Gaussian process fitter result. - Warning - This class is experimental and likely to be modified in future releases. To use it, import the - openturns.experimentalsubmodule.- Refer to Gaussian process regression. - Parameters:
- inputSample, outputSampleSample
- The samples - and - . 
- metaModelFunction
- The metamodel: - , defined in (1) by the trend function. 
- regressionMatrixMatrix
- The regression matrix, e.g the evaluation of the basis functions upon the input design sample. 
- basisBasis
- Functional basis of size - : - for - . Its size should be equal to zero if the trend is not estimated. 
- trendCoefsequence of float
- The trend coefficients vectors - . 
- covarianceModelCovarianceModel
- The covariance model of the Gaussian process with its optimized parameters. 
- optimalLogLikelihoodfloat
- The maximum log-likelihood corresponding to the model. 
- 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. 
 
 
- inputSample, outputSample
 - Methods - getBasis()- Accessor to the basis. - Accessor to the object's name. - Accessor to the covariance model. - Accessor to the input sample. - Accessor to the linear algebra method used to fit. - Accessor to the metamodel. - getName()- Accessor to the object's name. - getNoise()- Accessor to the Gaussian process. - Accessor to the optimal log-likelihood of the model. - Accessor to the output sample. - Accessor to the regression matrix. - 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()of the class- GaussianProcessFitterand obtained with its method- getResult().- Refer to Gaussian process regression (Step 1) to get all the notations and the theoretical aspects. We only detail here the notions related to the class. - This class creates the metamodel - defined by the estimated trend function: - (1)¶ - with - and - the trend functions for - and - . - Examples - Create the model - 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) >>> algo = otexp.GaussianProcessFitter(sampleX, sampleY, covarianceModel, basis) >>> algo.run() - Get the result: - >>> result = algo.getResult() - Get the metamodel - : - >>> metaModel = result.getMetaModel() >>> graph = metaModel.draw(0.0, 7.0) >>> cloud = ot.Cloud(sampleX, sampleY) >>> cloud.setPointStyle('fcircle') >>> graph = ot.Graph() >>> graph.add(cloud) >>> graph.add(g.draw(0.0, 7.0)) - __init__(*args)¶
 - getBasis()¶
- Accessor to the basis. - Returns:
- basisBasis
- Functional basis to estimate the trend: - . 
 
- basis
 - 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__). 
 
 
 - getCovarianceModel()¶
- Accessor to the covariance model. - Returns:
- covModelCovarianceModel
- The covariance model of the Gaussian process - with its optimized parameters. 
 
- covModel
 
 - 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. 
 
 
 
 - 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 - its the optimized parameters. 
 
- process
 
 - getOptimalLogLikelihood()¶
- Accessor to the optimal log-likelihood of the model. - Returns:
- optimalLogLikelihoodfloat
- The value of the log-likelihood corresponding to the model. 
 
 
 - getRegressionMatrix()¶
- Accessor to the regression matrix. - Returns:
- processMatrix
- Returns the regression matrix. 
 
- process
 - Notes - The regression matrix, e.g the evaluation of the basis functions upon the input design sample. It contains - lines and as many column as the size of the functional basis. The column - is defined as: 
 - getTrendCoefficients()¶
- Accessor to the trend coefficients. - Returns:
- trendCoefsequence of float
- The trend coefficients vectors - as a - Point.
 
 - Notes - As the same basis is used for each marginal output, each - vector is of dimension - , 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. 
 
- inputSample
 
 - setName(name)¶
- Accessor to the object’s name. - Parameters:
- namestr
- The name of the object. 
 
 
 
Examples using the class¶
Gaussian Process Regression: multiple input dimensions
 
Gaussian Process Regression: choose an arbitrary trend
Gaussian Process Regression: choose a polynomial trend on the beam model
Gaussian Process Regression : cantilever beam model
Gaussian Process Regression: choose a polynomial trend
 
Gaussian process fitter: configure the optimization solver
Gaussian Process Regression : generate trajectories from the metamodel
Gaussian Process Regression: metamodel of the Branin-Hoo function
Example of multi output Gaussian Process Regression on the fire satellite model
Gaussian Process Regression: propagate uncertainties
 OpenTURNS
      OpenTURNS