/usr/include/openturns/swig/MetaModelValidation_doc.i is in libopenturns-dev 1.9-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | %feature("docstring") OT::MetaModelValidation
"Base class to score a metamodel and perform validations.
Available constructor:
MetaModelValidation(*inputValidationSample, outputValidationSample, metaModel*)
Parameters
----------
inputValidationSample, outputValidationSample : 2-d sequence of float
The input and output validation samples, not used during the learning step.
metaModel : :class:`~openturns.Function`
Metamodel to validate.
Notes
-----
A MetaModelValidation object is used for the validation process of a metamodel.
For that purpose, a dataset independent of the learning step, is used to score the surrogate model.
Its main functionalities are :
- To compute the predictivity factor :math:`Q_2`
- To get the residual sample, its non parametric distribution
- To draw a `model vs metamodel` validation graph.
Currently only one dimensional output models are available.
Examples
--------
>>> import openturns as ot
>>> from math import pi
>>> dist = ot.Uniform(-pi/2, pi/2)
>>> # Model here is sin(x)
>>> model = ot.SymbolicFunction(['x'], ['sin(x)'])
>>> # We can build several types of models (kriging, pc, ...)
>>> # We use a Taylor developement (order 5) and compare the metamodel with the model
>>> metaModel = ot.SymbolicFunction(['x'], ['x - x^3/6.0 + x^5/120.0'])
>>> x = dist.getSample(10)
>>> y = model(x)
>>> # Validation of the model
>>> val = ot.MetaModelValidation(x, y, metaModel)
>>> # Compute the first indicator : q2
>>> q2 = val.computePredictivityFactor()
>>> # Get the residual
>>> residual = val.getResidualSample()
>>> # Get the histogram of residual
>>> histoResidual = val.getResidualDistribution(False)
>>> # Draw the validation graph
>>> graph = val.drawValidation()
"
// ---------------------------------------------------------------------
%feature("docstring") OT::MetaModelValidation::getInputSample
"Accessor to the input sample.
Returns
-------
inputSample : :class:`~openturns.Sample`
Input sample of a model evaluated apart."
// ---------------------------------------------------------------------
%feature("docstring") OT::MetaModelValidation::getOutputSample
"Accessor to the output sample.
Returns
-------
outputSample : :class:`~openturns.Sample`
Output sample of a model evaluated apart."
// ---------------------------------------------------------------------
%feature("docstring") OT::MetaModelValidation::computePredictivityFactor
"Compute the predictivity factor.
Returns
-------
q2 : float
The predictivity factor
Notes
-----
The predictivity factor :math:`Q_2` is given by :
.. math::
Q_2 = 1 - \\\\frac{\\\\sum_{l=1}^{N} Y_{l} -\\\\hat{f}(X_l)}{Var(Y)}"
// ---------------------------------------------------------------------
%feature("docstring") OT::MetaModelValidation::getResidualSample
"Compute the residual sample.
Returns
-------
residual : :class:`~openturns.Sample`
The residual sample.
Notes
-----
The residual sample is given by :
.. math::
\\\\epsilon_{l} = Y_{l} -\\\\hat{f}(X_l)"
// ---------------------------------------------------------------------
%feature("docstring") OT::MetaModelValidation::getResidualDistribution
"Compute the non parametric distribution of the residual sample.
Parameters
----------
smooth : bool
Tells if distribution is smooth (true) or not.
Default argument is true.
Returns
-------
residualDistribution : :class:`~openturns.Distribution`
The residual distribution.
Notes
-----
The residual distribution is built thanks to :class:`~openturns.KernelSmoothing` if `smooth` argument is true. Otherwise, an histogram distribution is returned, thanks to :class:`~openturns.HistogramFactory`."
// ---------------------------------------------------------------------
%feature("docstring") OT::MetaModelValidation::drawValidation
"Plot a model vs metamodel graph for visual validation.
Returns
-------
graph : :class:`~openturns.Graph`
The visual validation graph."
|