/usr/include/openturns/swig/CleaningStrategy_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 | %feature("docstring") OT::CleaningStrategy
"Cleaning truncation strategy.
Available constructors:
CleaningStrategy(*orthogonalBasis, maximumDimension*)
CleaningStrategy(*orthogonalBasis, maximumDimension, verbose*)
CleaningStrategy(*orthogonalBasis, maximumDimension, maximumSize,
significanceFactor*)
CleaningStrategy(*orthogonalBasis, maximumDimension, maximumSize,
significanceFactor, verbose*)
Parameters
----------
orthogonalBasis : :class:`~openturns.OrthogonalBasis`
An OrthogonalBasis.
maximumDimension : positive int
Maximum index that can be used by the :class:`~openturns.EnumerateFunction`
to determine the last term of the basis.
maximumSize : positve int
Parameter that characterizes the cleaning strategy. It represents the
number of efficient coefficients of the basis. Its default value is set to
20.
significanceFactor : float
Parameter used as a threshold for selecting the efficient coefficients of
the basis. The real threshold represents the multiplication of the
significanceFactor with the maximum magnitude of the current determined
coefficients. Its default value is equal to :math:`1e^{-4}`.
verbose : bool
Used for the online monitoring of the current basis updates (removed or
added coefficients).
See also
--------
AdaptiveStrategy, FixedStrategy, SequentialStrategy
Notes
-----
The cleaning strategy aims at building a PC expansion containing at most
:math:`P` significant coefficients, i.e. at most :math:`P` significant basis
functions. It proceeds as follows:
- Generate an initial PC basis made of the :math:`P` first polynomials
(according to the adopted :class:`~openturns.EnumerateFunction`), or
equivalently an initial set of indices :math:`K = \\\\{0, \\\\ldots, P-1\\\\}`.
- Discard from the basis all those polynomials :math:`\\\\Psi_j` associated with
insignificance coefficients, i.e. the coefficients that satisfy:
.. math::
|a_j| \\\\leq \\\\epsilon \\\\times \\\\max_{ k \\\\in K } |a_k|
where :math:`\\\\epsilon` is the significance factor, default is
:math:`\\\\epsilon = 10^{-4}`.
- Add the next basis term :math:`\\\\Psi_{k+1}` to the current basis :math:`K`.
- Reiterate the procedure until either :math:`P` terms have been retained or if
the given maximum index :math:`P_{max}` has been reached.
Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> # Define the model
>>> inputDim = 1
>>> model = ot.NumericalMathFunction(['x'], ['y'], ['x*sin(x)'])
>>> # Create the input distribution
>>> distribution = ot.ComposedDistribution([ot.Uniform()]*inputDim)
>>> # Construction of the multivariate orthonormal basis
>>> polyColl = [0.]*inputDim
>>> for i in range(distribution.getDimension()):
... polyColl[i] = ot.StandardDistributionPolynomialFactory(distribution.getMarginal(i))
>>> enumerateFunction = ot.LinearEnumerateFunction(inputDim)
>>> productBasis = ot.OrthogonalProductPolynomialFactory(polyColl, enumerateFunction)
>>> # Truncature strategy of the multivariate orthonormal basis
>>> # We want to select, among the maximumDimension = 100 first polynomials of
>>> # the multivariate basis, those which have the maximumSize = 20 most
>>> # significant contribution (greatest coefficients), with respect to the
>>> # significance factor = 10^-4.
>>> maximumDimension = 100
>>> maximumSize = 20
>>> significanceFactor = 1e-4
>>> adaptiveStrategy = ot.CleaningStrategy(productBasis, maximumDimension,
... maximumSize, significanceFactor)"
// ---------------------------------------------------------------------
%feature("docstring") OT::CleaningStrategy::getCurrentVectorIndex
"Accessor to the current vector index.
Returns
-------
index : integer
Current index of the basis term."
// ---------------------------------------------------------------------
%feature("docstring") OT::CleaningStrategy::getMaximumSize
"Accessor to the maximum size of the orthogonal basis.
Returns
-------
size : integer
Maximum number of significant terms of the basis.
See also
--------
setMaximumSize"
// ---------------------------------------------------------------------
%feature("docstring") OT::CleaningStrategy::getSignificanceFactor
"Accessor to the significance factor.
Returns
-------
factor : float
Value of the significance factor.
See also
--------
setSignificanceFactor"
// ---------------------------------------------------------------------
%feature("docstring") OT::CleaningStrategy::getVerbose
"Accessor to the verbose.
Returns
-------
verbose : bool
Return if the online monitoring of the current basis updates is enabled or not.
See also
--------
setVerbose"
// ---------------------------------------------------------------------
%feature("docstring") OT::CleaningStrategy::setMaximumSize
"Accessor to the maximum size of the orthogonal basis.
Parameters
----------
size : integer
Maximum number of significant terms of the basis.
See also
--------
getMaximumSize"
// ---------------------------------------------------------------------
%feature("docstring") OT::CleaningStrategy::setSignificanceFactor
"Accessor to the significance factor.
Parameters
----------
factor : float
Value of the significance factor.
See also
--------
getSignificanceFactor"
// ---------------------------------------------------------------------
%feature("docstring") OT::CleaningStrategy::setVerbose
"Accessor to the verbose.
Parameters
----------
verbose : bool
Enable the online monitoring of the current basis updates or not.
See also
--------
getVerbose"
|