The SUMO toolbox  2018a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Static Public Member Functions | List of all members
GaussianProcessModel Class Reference

Represents a Gaussian Process surrogate model. More...

Inheritance diagram for GaussianProcessModel:
Inheritance graph
[legend]

Public Member Functions

function GaussianProcessModel (var varargin)
 Class constructor. More...
 
function constructInModelSpace (var samples, var values)
 Just sets all members to new samples and values. More...
 
function evaluateInModelSpace (var points)
 Evaluate the model at the given points. More...
 
function evaluateCovarianceMatrixInModelSpace (var points)
 Evaluate the posterior covariance matrix at the given points. More...
 
function covarianceMatrix (var points1, var points2)
 Return covariance matrix. More...
 
function getHyperparameters ()
 Returns the hyperparameters. More...
 
function getNoiseVariance ()
 Returns noise variance sn2 with respect to scaled samples! More...
 
function getLengthScale ()
 Returns the covariance function lengthscale w.r.t scaled samples! More...
 
function getProcessVariance ()
 Returns the process variance sigma w.r.t scaled samples! More...
 
function getMeanFunction ()
 Returns the mean function. More...
 
function getCovarianceFunction ()
 Returns the covariance function. More...
 
function getLikelihoodFunction ()
 Returns the likelihood function. More...
 
function getDescription ()
 Return a user friendly model description. More...
 
function likelihood (var x)
 Return the likelihood of a given set of hyperparameters. More...
 
function getSensitivityIndices (var order, var type, var method)
 Calculates sensitivity indices. More...
 
function scale (var X, var values)
 Just sets all members to new samples and values. More...
 
function unscale (var X, var values)
 Just sets all members to new samples and values. More...
 
function getScaledSamples ()
 Just sets all members to new samples and values. More...
 
function getScaledValues ()
 Just sets all members to new samples and values. More...
 
function getNestedModel ()
 
function basicPlotModel ()
 This is a basic/default implementation called by plotModel.m, if subclasses want more fancy features they should override plotModel and not basicPlotModel. More...
 
function init (var samples, var values)
 This base class method simply sets all the necessary fields (dimension, samples, values, id, ...) More...
 
function construct (var samples, var values)
 Constructs the model given the samples and values in simulator space. More...
 
function update (var samples, var values)
 Update the model with new data without fully retraining the model. More...
 
function getDimensions ()
 Return the input and output dimensions of the model. More...
 
function getExpression (var outputIndex)
 This function first converts the inputs to model space [-1,1] range using the transformation functions and then passes on these functions to the model-space expression. More...
 
function getId ()
 Returns the id of this model. More...
 
function getGrid ()
 Returns a set of samples evaluated on a dense grid to be used for evaluation of the model. More...
 
function equals (var m, var threshold)
 A grid based equality method. More...
 
function evaluate (var points)
 Evaluation at a set of points. More...
 
function evaluateDerivative (var points, var outputIndex)
 Approximate the derivative at the given points in simulator space. More...
 
function evaluateBatch (var points, var batchSize)
 Evaluate a large set of samples in smaller batchs. More...
 
function evaluateInModelSpaceBatch (var points, var batchSize)
 Evaluate a large set of samples in smaller batchs. More...
 
function setTransformationValues (var transf)
 Set the simulator to model and model to simulator transformation functions for this model. More...
 
function getTransformationFunctions ()
 Get the simulator to model and model to simulator transformation functions for this model. More...
 
function getTransformationValues ()
 
function setMeasureScores (var scores)
 Sets scores of this model. More...
 
function getMeasureScores ()
 Returns the structure containing the detailed measure scores for each output. More...
 
function getSamples ()
 Returns the set of samples (in simulator space) on which this model was built. More...
 
function getSamplesInModelSpace ()
 Returns the set of samples on which this model was built (in model space! so in [-1 1]) More...
 
function getValues ()
 Returns the set of values in the samples on which this model was built. More...
 
function setScore (var score)
 Set the global score for this model. More...
 
function getScore ()
 Return the global score of the model. More...
 
function getBounds ()
 Return the lower and upper bounds (in the original simulator space) of each model input. More...
 
function getInputNames ()
 Get the names of the input parameters. More...
 
function getOutputNames ()
 Get the names of the output parameters. More...
 
function setMode (var mode)
 
function getMode ()
 
function setTrainingTime (var trainingTime)
 
function getTrainingTime ()
 
function getType ()
 
function getVersionId ()
 
function display ()
 
function plotModel ()
 Plots the model on the given domain (default: [-1 1]). More...
 
function plotSobolIndices (var varargin)
 Plots the first order total Sobol indices in a pie chart. More...
 
function complexity ()
 Returns the number of free variables in the model. More...
 
function getExpressionInModelSpace (var outputIndex)
 Override if the model can generate a symbolic expression. More...
 
function evaluateDerivativeInModelSpace (var points, var outputIndex)
 Approximate the derivative at the given points in model space. More...
 
function updateInModelSpace (var samples, var values)
 Update the model with new data without fully retraining the model. More...
 
function setInputNames (var names)
 Set the names of the input parameters. More...
 
function setOutputNames (var names)
 Set the names of the output parameters. More...
 

Static Public Member Functions

static function getPlotDefaults ()
 
static function loadobj (var this)
 

Detailed Description

Represents a Gaussian Process surrogate model.

Constructor & Destructor Documentation

function GaussianProcessModel ( var  varargin)
inline

Class constructor.

Initializes the Gaussian Process model.

Returns
instance of the GaussianProcessModel class

Member Function Documentation

function basicPlotModel ( )
inherited

This is a basic/default implementation called by plotModel.m, if subclasses want more fancy features they should override plotModel and not basicPlotModel.

Todo:
not sure why this would be needed
function complexity ( )
inherited

Returns the number of free variables in the model.

By default this is the number of samples.

function construct ( var  samples,
var  values 
)
inherited

Constructs the model given the samples and values in simulator space.

This function scales the data to model space and calls constructInModelSpace()

function constructInModelSpace ( var  samples,
var  values 
)

Just sets all members to new samples and values.

Parameters
samplesinput data
valuesoutput data
function covarianceMatrix ( var  points1,
var  points2 
)

Return covariance matrix.

Just sets all members to new samples and values.

Parameters
points1input points to evaluate
points2input points to evaluate (other set)
Return values
Kstarcovariance matrix size(points1, 1) x size(points2,1)
function display ( )
inlineinherited
function equals ( var  m,
var  threshold 
)
inherited

A grid based equality method.

Evaluates 'm' and 'this' on a grid and returns true if the mean relative error is <= threshold

function evaluate ( var  points)
inherited

Evaluation at a set of points.

function evaluateBatch ( var  points,
var  batchSize 
)
inherited

Evaluate a large set of samples in smaller batchs.

Todo:
some duplicate code, see evaluateInModelSpaceBatch
function evaluateCovarianceMatrixInModelSpace ( var  points)

Evaluate the posterior covariance matrix at the given points.

Evaluate the covariance poster at the given points X http://stats.stackexchange.com/questions/133728/posterior-covariance-from-gpml-toolbox.

Parameters
pointsinput points to evaluate
Return values
valueskPost of the evaluated points
function evaluateDerivative ( var  points,
var  outputIndex 
)
inherited

Approximate the derivative at the given points in simulator space.

This function transforms the points to model space and calls evaluateDerivativeInModelSpace

function evaluateDerivativeInModelSpace ( var  points,
var  outputIndex 
)
inherited

Approximate the derivative at the given points in model space.

It will return the gradient in each dimension. This is just a very simple implementation based on a simple symmetric approximation. Note that models can override this with more efficient implementations. For example Rational/Polynomial models would be able to provide exact derivatives. The same goes for Kriging models.

For a good tutorial/intro on gradients see: http://www-math.mit.edu/18.013A/HTML/chapter07/contents.html

function evaluateInModelSpace ( var  points)

Evaluate the model at the given points.

Parameters
pointsinput points to evaluate
Return values
valuesvalues of the evaluated points
function evaluateInModelSpaceBatch ( var  points,
var  batchSize 
)
inherited

Evaluate a large set of samples in smaller batchs.

function getBounds ( )
inherited

Return the lower and upper bounds (in the original simulator space) of each model input.

function getCovarianceFunction ( )
inline

Returns the covariance function.

Return values
covFunca basisFunction class
function getDescription ( )

Return a user friendly model description.

Return values
descdescription
function getDimensions ( )
inherited

Return the input and output dimensions of the model.

function getExpression ( var  outputIndex)
inherited

This function first converts the inputs to model space [-1,1] range using the transformation functions and then passes on these functions to the model-space expression.

function getExpressionInModelSpace ( var  outputIndex)
inherited

Override if the model can generate a symbolic expression.

function getGrid ( )
inherited

Returns a set of samples evaluated on a dense grid to be used for evaluation of the model.

Recycles previously evaluated grids.

function getHyperparameters ( )
inline

Returns the hyperparameters.

mean + covariance + likelihood parameters

Return values
hpvector of hyperparameters
function getId ( )
inherited

Returns the id of this model.

Id's are defined in the construct function, so that a model that is reconstructed gets a new unique id.

function getInputNames ( )
inherited

Get the names of the input parameters.

function getLengthScale ( )
inline

Returns the covariance function lengthscale w.r.t scaled samples!

Return values
lcovariance lengthscale for each dimension.
function getLikelihoodFunction ( )
inline

Returns the likelihood function.

Return values
likFunca basisFunction class
function getMeanFunction ( )
inline

Returns the mean function.

Return values
meanFunca basisFunction class
function getMeasureScores ( )
inherited

Returns the structure containing the detailed measure scores for each output.

function getMode ( )
inlineinherited
function getNestedModel ( )
inlineinherited
function getNoiseVariance ( )
inline

Returns noise variance sn2 with respect to scaled samples!

Return values
sn2noise variance
function getOutputNames ( )
inherited

Get the names of the output parameters.

static function getPlotDefaults ( )
inlinestaticinherited
function getProcessVariance ( )
inline

Returns the process variance sigma w.r.t scaled samples!

Return values
sigmaprocess variance
function getSamples ( )
inherited

Returns the set of samples (in simulator space) on which this model was built.

function getSamplesInModelSpace ( )
inherited

Returns the set of samples on which this model was built (in model space! so in [-1 1])

function getScaledSamples ( )

Just sets all members to new samples and values.

function getScaledValues ( )

Just sets all members to new samples and values.

function getScore ( )
inherited

Return the global score of the model.

function getSensitivityIndices ( var  order,
var  type,
var  method 
)

Calculates sensitivity indices.

Analytical calculation supported for cov={'covSEiso','covSEard','covSepMaterniso','covSepMaternard'} For other covariance functions Monte carlo will be used type is one of 'variance' (Sobol), 'derivative' method is one of 'analytical', 'montecarlo'

function getTrainingTime ( )
inlineinherited
function getTransformationFunctions ( )
inherited

Get the simulator to model and model to simulator transformation functions for this model.

Return values
inFuncsimulator -> model space
outFuncmodel -> simulator space
function getTransformationValues ( )
inlineinherited
function getType ( )
inlineinherited
function getValues ( )
inherited

Returns the set of values in the samples on which this model was built.

function getVersionId ( )
inlineinherited
function init ( var  samples,
var  values 
)
inherited

This base class method simply sets all the necessary fields (dimension, samples, values, id, ...)

function likelihood ( var  x)

Return the likelihood of a given set of hyperparameters.

static function loadobj ( var  this)
inlinestaticinherited
function plotModel ( )
inherited

Plots the model on the given domain (default: [-1 1]).

Slice plots are made for dimensions larger than 2. Dimensions higher than 5 are clamped to 0. Subclasses may override this method if they wish to allow for model specific plotting. This implementation simply calls basicPlotModel. The default plot options can be found by calling the static member function getPlotDefaults().

Calling syntax: fighandle = plotModel(model,[output number],[options structure])

function plotSobolIndices ( var  varargin)
inherited

Plots the first order total Sobol indices in a pie chart.

function scale ( var  X,
var  values 
)

Just sets all members to new samples and values.

function setInputNames ( var  names)
inherited

Set the names of the input parameters.

function setMeasureScores ( var  scores)
inherited

Sets scores of this model.

function setMode ( var  mode)
inlineinherited
function setOutputNames ( var  names)
inherited

Set the names of the output parameters.

function setScore ( var  score)
inherited

Set the global score for this model.

function setTrainingTime ( var  trainingTime)
inlineinherited
function setTransformationValues ( var  transf)
inherited

Set the simulator to model and model to simulator transformation functions for this model.

function unscale ( var  X,
var  values 
)

Just sets all members to new samples and values.

function update ( var  samples,
var  values 
)
inherited

Update the model with new data without fully retraining the model.

This is useful for model types that support on-line learning This base class implementation simply calls construct. It is up to the model type to give a more efficient implementation

function updateInModelSpace ( var  samples,
var  values 
)
inherited

Update the model with new data without fully retraining the model.

This is useful for model types that support on-line learning This base class implementation simply calls constructInModelSpace. It is up to the model type to give a more efficient implementation


The documentation for this class was generated from the following files: