CalibrationResult

(Source code, png)

../../_images/CalibrationResult.png
class CalibrationResult(*args)

Calibration result.

Returned by calibration algorithms, see CalibrationAlgorithm.

Parameters:
parameterPriorDistribution

The prior distribution of the parameter.

parameterPosteriorDistribution

The posterior distribution of the parameter.

parameterMapsequence of float

The maximum a posteriori estimate of the parameter.

observationsErrorDistribution

The distribution of the observations error.

inputObservationsSample

The sample of input observations.

outputObservationsSample

The sample of output observations.

residualFunctionFunction

The residual function.

bayesianbool

Whether the method is Bayesian

Methods

drawObservationsVsInputs()

Draw observations/inputs.

drawObservationsVsPredictions()

Draw observations/predictions.

drawParameterDistributions()

Draw parameter prior/posterior.

drawResiduals()

Draw residuals.

drawResidualsNormalPlot()

Draw residuals normal plot.

getClassName()

Accessor to the object's name.

getInputObservations()

Accessor to the input observations.

getName()

Accessor to the object's name.

getObservationsError()

Accessor to the observations error distribution.

getOutputAtPosteriorMean()

Accessor to the output observations.

getOutputAtPriorMean()

Accessor to the output observations.

getOutputObservations()

Accessor to the output observations.

getParameterMAP()

Accessor to the maximum a posteriori parameter estimate.

getParameterPosterior()

Accessor to the parameter posterior distribution.

getParameterPrior()

Accessor to the parameter prior distribution.

getResidualFunction()

Accessor to the residual function.

hasName()

Test if the object is named.

isBayesian()

Bayesian method accessor.

setInputObservations(inputObservations)

Accessor to the input observations.

setName(name)

Accessor to the object's name.

setObservationsError(observationsError)

Accessor to the observations error distribution.

setOutputAtPriorAndPosteriorMean(...)

Accessor to the output at prior/posterior mean.

setOutputObservations(outputObservations)

Accessor to the output observations.

setParameterMAP(parameterMAP)

Accessor to the maximum a posteriori parameter estimate.

setParameterPosterior(parameterPosterior)

Accessor to the parameter posterior distribution.

setParameterPrior(parameterPrior)

Accessor to the parameter prior distribution.

setResidualFunction(residualFunction)

Accessor to the residual function.

Notes

The residual function returns model(inputObservations) - outputObservations.

Examples

>>> import openturns as ot

# assume we obtained a result from CalibrationAlgorithm

>>> result = ot.CalibrationResult()
>>> pmap = result.getParameterMAP()
>>> prior = result.getParameterPrior()
>>> posterior = result.getParameterPosterior()
>>> graph1 = result.drawParameterDistributions()  
>>> graph2 = result.drawResiduals()  
>>> graph3 = result.drawObservationsVsInputs()  
>>> graph4 = result.drawObservationsVsPredictions()  
__init__(*args)
drawObservationsVsInputs()

Draw observations/inputs.

Plot the observed output of the model depending on the observed input before and after calibration.

Returns:
gridGridLayout

Graph array.

drawObservationsVsPredictions()

Draw observations/predictions.

Plots the output of the model depending on the output observations before and after calibration.

Returns:
gridGridLayout

Graph array.

drawParameterDistributions()

Draw parameter prior/posterior.

Plots the prior and posterior distribution of the calibrated parameter theta.

Returns:
gridGridLayout

Graph array.

drawResiduals()

Draw residuals.

Plot the distribution of the sample residuals before and after calibration using kernel smoothing and the distribution of the observation errors.

Returns:
gridGridLayout

Graph array.

drawResidualsNormalPlot()

Draw residuals normal plot.

Plots the quantile-quantile graphs of the empirical residual after calibration vs the Gaussian distribution.

Returns:
gridGridLayout

Graph array.

getClassName()

Accessor to the object’s name.

Returns:
class_namestr

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

getInputObservations()

Accessor to the input observations.

Returns:
inputObservationsSample

The sample of input observations.

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

getObservationsError()

Accessor to the observations error distribution.

Returns:
observationsErrorDistribution

The observations error distribution.

getOutputAtPosteriorMean()

Accessor to the output observations.

Returns:
outputAtPosteriorSample

Output at posterior mean.

getOutputAtPriorMean()

Accessor to the output observations.

Returns:
outputAtPriorSample

Output at prior mean.

getOutputObservations()

Accessor to the output observations.

Returns:
outputObservationsSample

The sample of output observations.

getParameterMAP()

Accessor to the maximum a posteriori parameter estimate.

Returns:
parameterPosteriorPoint

The maximum a posteriori parameter estimate.

getParameterPosterior()

Accessor to the parameter posterior distribution.

The content of the posterior distribution depends of the class that created this distribution. The next table presents this distribution depending on the algorithm.

Class

Distribution

LinearLeastSquaresCalibration

Distribution of the parameters with respect to randomness in the data

NonLinearLeastSquaresCalibration

Distribution of the parameters with respect to randomness in the data

GaussianLinearCalibration

Posterior distribution of the parameters given the observations

GaussianNonLinearCalibration

Distribution of the MAP with respect to randomness in the data

Table 1. Content of the distribution returned by getParameterPosterior() different classes returning a CalibrationResult.

Returns:
parameterPosteriorDistribution

The posterior distribution of the parameter.

getParameterPrior()

Accessor to the parameter prior distribution.

Returns:
parameterPriorDistribution

The prior distribution of the parameter.

getResidualFunction()

Accessor to the residual function.

Returns:
residualFunctionFunction

The residual function.

hasName()

Test if the object is named.

Returns:
hasNamebool

True if the name is not empty.

isBayesian()

Bayesian method accessor.

Returns:
bayesianbool

Whether the method is Bayesian

setInputObservations(inputObservations)

Accessor to the input observations.

Parameters:
inputObservationsSample

The sample of input observations.

setName(name)

Accessor to the object’s name.

Parameters:
namestr

The name of the object.

setObservationsError(observationsError)

Accessor to the observations error distribution.

Parameters:
observationsErrorDistribution

The observations error distribution.

setOutputAtPriorAndPosteriorMean(outputAtPriorMean, outputAtPosteriorMean)

Accessor to the output at prior/posterior mean.

Parameters:
outputAtPriorSample

The sample of output at prior mean.

outputAtPosteriorSample

The sample of output at posterior mean.

setOutputObservations(outputObservations)

Accessor to the output observations.

Parameters:
outputObservationsSample

The sample of output observations.

setParameterMAP(parameterMAP)

Accessor to the maximum a posteriori parameter estimate.

Parameters:
parameterPosteriorsequence of float

The maximum a posteriori parameter estimate.

setParameterPosterior(parameterPosterior)

Accessor to the parameter posterior distribution.

Parameters:
parameterPosterior: Distribution

The posterior distribution of the parameter.

setParameterPrior(parameterPrior)

Accessor to the parameter prior distribution.

Parameters:
parameterPrior: Distribution

The prior distribution of the parameter.

setResidualFunction(residualFunction)

Accessor to the residual function.

Parameters:
residualFunctionFunction

The residual function.

Examples using the class

Calibrate a parametric model: a quick-start guide to calibration

Calibrate a parametric model: a quick-start guide to calibration

Calibration without observed inputs

Calibration without observed inputs

Calibration of the logistic model

Calibration of the logistic model

Calibration of the deflection of a tube

Calibration of the deflection of a tube

Calibration of the flooding model

Calibration of the flooding model

Calibration of the Chaboche mechanical model

Calibration of the Chaboche mechanical model