/usr/include/openturns/swig/CalibrationStrategyImplementation_doc.i is in libopenturns-dev 1.7-3.
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 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | %define OT_CalibrationStrategy_doc
"Calibration strategy.
Available constructors:
CalibrationStrategy(*range*)
CalibrationStrategy(*range=[0.117, 0.468], expansionFactor=1.2, shrinkFactor=0.8, calibrationStep=100*)
Parameters
----------
range : :class:`~openturns.Interval` of dimension 1 :math:`[m,M]`
Acceptance rate values for which no update of the *calibration* coefficient
is performed.
expansionFactor : float, :math:`e > 1`
Expansion factor :math:`e` to use to rescale the *calibration* coefficient
if the latter is too high (greater than the upper bound of range).
shrinkFactor : float, :math:`0 < s < 1`
Shrink factor :math:`s` to use to rescale the *calibration* coefficient if
the latter is too low (smaller than the lower bound of range). If
*expansionFactor* is specified, *shrinkFactor* must be mentioned too.
calibrationStep : positive int
Calibration step corresponding for example to :math:`q` in the description
of the method
:meth:`~openturns.RandomWalkMetropolisHastings.getCalibrationStrategyPerComponent`
of the RandomWalkMetropolisHastings class.
Notes
-----
A CalibrationStrategy can be used by a
:class:`~openturns.RandomWalkMetropolisHastings` for example (see the
description of the method
:meth:`~openturns.RandomWalkMetropolisHastings.getCalibrationStrategyPerComponent`
)."
%enddef
%feature("docstring") OT::CalibrationStrategyImplementation
OT_CalibrationStrategy_doc
// ---------------------------------------------------------------------
%define OT_CalibrationStrategy_computeUpdateFactor_doc
"Compute the update factor.
Parameters
----------
rho : float
Acceptance rate :math:`\\\\rho` to take into account.
Returns
-------
lambda : float
Let :math:`\\\\lambda` be the *calibration* coefficient to update, it gives a
factor :math:`\\\\phi(\\\\rho)` such that :math:`\\\\phi(\\\\rho) \\\\lambda` is the
updated *calibration* coefficient according to the strategy. The value is
computed as follows:
.. math::
\\\\phi(\\\\rho) = \\\\left\\\\{
\\\\begin{array}{l}
\\\\displaystyle s \\\\quad if \\\\; \\\\rho < m \\\\\\\\
\\\\displaystyle e \\\\quad if \\\\; \\\\rho > M \\\\\\\\
\\\\displaystyle 1 \\\\quad otherwise
\\\\end{array}
\\\\right.
with :math:`s \\\\in ]0, 1[, e > 1` and :math:`[m,M]` the values given,
respectively, by the methods :meth:`getShrinkFactor`,
:meth:`getExpansionFactor` and :meth:`getRange`.
Examples
--------
>>> import openturns as ot
>>> calibration = ot.CalibrationStrategy(ot.Interval(0.1, 0.4), 1.2, 0.8)
>>> print(calibration.computeUpdateFactor(0.09))
0.8
>>> print(calibration.computeUpdateFactor(0.6))
1.2
>>> print(calibration.computeUpdateFactor(0.18))
1.0"
%enddef
%feature("docstring") OT::CalibrationStrategyImplementation::computeUpdateFactor
OT_CalibrationStrategy_computeUpdateFactor_doc
// ---------------------------------------------------------------------
%define OT_CalibrationStrategy_getCalibrationStep_doc
"Get the calibration step.
Returns
-------
step : positive int
Calibration step corresponding for example to :math:`q` in the description
of the method
:meth:`~openturns.RandomWalkMetropolisHastings.getCalibrationStrategyPerComponent`
of the RandomWalkMetropolisHastings class."
%enddef
%feature("docstring") OT::CalibrationStrategyImplementation::getCalibrationStep
OT_CalibrationStrategy_getCalibrationStep_doc
// ---------------------------------------------------------------------
%define OT_CalibrationStrategy_setCalibrationStep_doc
"Set the calibration step.
Parameters
----------
step : positive int
Calibration step corresponding for example to :math:`q` in the description
of the method
:meth:`~openturns.RandomWalkMetropolisHastings.getCalibrationStrategyPerComponent`
of the RandomWalkMetropolisHastings class."
%enddef
%feature("docstring") OT::CalibrationStrategyImplementation::setCalibrationStep
OT_CalibrationStrategy_setCalibrationStep_doc
// ---------------------------------------------------------------------
%define OT_CalibrationStrategy_getExpansionFactor_doc
"Get the expansion factor.
Returns
-------
expansionFactor : float
Expansion factor :math:`e`. See the description of the method
:meth:`computeUpdateFactor`."
%enddef
%feature("docstring") OT::CalibrationStrategyImplementation::getExpansionFactor
OT_CalibrationStrategy_getExpansionFactor_doc
// ---------------------------------------------------------------------
%define OT_CalibrationStrategy_setExpansionFactor_doc
"Set the expansion factor.
Parameters
----------
expansionFactor : float, :math:`e > 1`
Expansion factor :math:`e`. See the description of the method
:meth:`computeUpdateFactor`."
%enddef
%feature("docstring") OT::CalibrationStrategyImplementation::setExpansionFactor
OT_CalibrationStrategy_setExpansionFactor_doc
// ---------------------------------------------------------------------
%define OT_CalibrationStrategy_getRange_doc
"Get the range.
Returns
-------
range : :class:`~openturns.Interval` of dimension 1
Range :math:`[m,M]` in the description of the method
:meth:`computeUpdateFactor`."
%enddef
%feature("docstring") OT::CalibrationStrategyImplementation::getRange
OT_CalibrationStrategy_getRange_doc
// ---------------------------------------------------------------------
%define OT_CalibrationStrategy_setRange_doc
"Set the range.
Parameters
----------
range : :class:`~openturns.Interval` of dimension 1
Range :math:`[m,M]` in the description of the method
:meth:`computeUpdateFactor`."
%enddef
%feature("docstring") OT::CalibrationStrategyImplementation::setRange
OT_CalibrationStrategy_setRange_doc
// ---------------------------------------------------------------------
%define OT_CalibrationStrategy_getShrinkFactor_doc
"Get the shrink factor.
Returns
-------
shrinkFactor : float
Shrink factor :math:`s` in the description of the method
:meth:`computeUpdateFactor`."
%enddef
%feature("docstring") OT::CalibrationStrategyImplementation::getShrinkFactor
OT_CalibrationStrategy_getShrinkFactor_doc
// ---------------------------------------------------------------------
%define OT_CalibrationStrategy_setShrinkFactor_doc
"Set the shrink factor.
Parameters
----------
shrinkFactor : float, :math:`0 < s < 1`
Shrink factor :math:`s` in the description of the method
:meth:`computeUpdateFactor`."
%enddef
%feature("docstring") OT::CalibrationStrategyImplementation::setShrinkFactor
OT_CalibrationStrategy_setShrinkFactor_doc
|