CalibrationResult

(Source code, png, hires.png, pdf)

../../_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.

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()  

Methods

drawObservationsVsInputs()

Draw observations/inputs.

drawObservationsVsPredictions()

Draw observations/predictions.

drawParameterDistributions()

Draw parameter prior/posterior.

drawResiduals()

Draw residuals.

getClassName()

Accessor to the object's name.

getId()

Accessor to the object's id.

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.

getShadowedId()

Accessor to the object's shadowed id.

getVisibility()

Accessor to the object's visibility state.

hasName()

Test if the object is named.

hasVisibleName()

Test if the object has a distinguishable name.

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.

setShadowedId(id)

Accessor to the object's shadowed id.

setVisibility(visible)

Accessor to the object's visibility state.

__init__(*args)
drawObservationsVsInputs()

Draw observations/inputs.

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

Returns:
graphGraph

Graph.

Examples

>>> import openturns as ot
>>> result = ot.CalibrationResult()
drawObservationsVsPredictions()

Draw observations/predictions.

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

Returns:
graphGraph

Graph.

Examples

>>> import openturns as ot
>>> result = ot.CalibrationResult()
drawParameterDistributions()

Draw parameter prior/posterior.

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

Returns:
graphGraph

Graph.

Examples

>>> import openturns as ot
>>> result = ot.CalibrationResult()
drawResiduals()

Draw residuals.

Plot the distribution of the residuals and the distribution of the observation errors.

Returns:
graphGraph

Graph.

Examples

>>> import openturns as ot
>>> result = ot.CalibrationResult()
getClassName()

Accessor to the object’s name.

Returns:
class_namestr

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

getId()

Accessor to the object’s id.

Returns:
idint

Internal unique identifier.

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.

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.

getShadowedId()

Accessor to the object’s shadowed id.

Returns:
idint

Internal unique identifier.

getVisibility()

Accessor to the object’s visibility state.

Returns:
visiblebool

Visibility flag.

hasName()

Test if the object is named.

Returns:
hasNamebool

True if the name is not empty.

hasVisibleName()

Test if the object has a distinguishable name.

Returns:
hasVisibleNamebool

True if the name is not empty and not the default one.

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.

setShadowedId(id)

Accessor to the object’s shadowed id.

Parameters:
idint

Internal unique identifier.

setVisibility(visible)

Accessor to the object’s visibility state.

Parameters:
visiblebool

Visibility flag.

Examples using the class

Calibration without observed inputs

Calibration without observed inputs

Calibration of the deflection of a tube

Calibration of the deflection of a tube

Calibration of the logistic model

Calibration of the logistic model

Calibration of the Chaboche mechanical model

Calibration of the Chaboche mechanical model

Calibration of the flooding model

Calibration of the flooding model