/usr/include/openturns/swig/WeightedExperiment_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 | %feature("docstring") OT::WeightedExperiment
"Weighted experiment.
Available constructor:
WeightedExperiment(*distribution=ot.Uniform(), size=100*)
Parameters
----------
distribution : :class:`~openturns.Distribution`
Distribution :math:`\\\\mu` used to generate the set of input data.
size : positive int
Number :math:`cardI` of points that will be generated in the experiment.
Notes
-----
WeightedExperiment is used to generate the points :math:`\\\\Xi_i` so that the
mean :math:`E_{\\\\mu}` is approximated as follows:
.. math::
E_{\\\\mu} \\\\left[ f(\\\\vect{Z}) \\\\right] \\\\simeq \\\\sum_{i \\\\in I} \\\\omega_i f(\\\\Xi_i)
where :math:`\\\\mu` is a distribution, :math:`f` is a function :math:`L_1(\\\\mu)`
and :math:`\\\\omega_i` are the weights associated with the points. By default,
all the weights are equal to :math:`1/cardI`.
A WeightedExperiment object can be created only through its derived classes
which are distributed in three groups:
1. The first category is made up of the random patterns, where the set of input
data is generated from the joint distribution of the input random vector,
according to these sampling techniques:
- :class:`Monte Carlo <openturns.MonteCarloExperiment>`
- :class:`LHS <openturns.LHSExperiment>`
- :class:`Bootstrap <openturns.BootstrapExperiment>`
- :class:`Importance Sampling <openturns.ImportanceSamplingExperiment>`
2. The second category contains the :class:`low discrepancy sequences
<openturns.LowDiscrepancySequence>`. OpenTURNS proposes the Faure, Halton,
Haselgrove, Reverse Halton and Sobol sequences.
3. The third category consists of deterministic patterns:
- :class:`Gauss product <openturns.GaussProductExperiment>`
- :class:`~openturns.FixedExperiment`
- :class:`~openturns.LowDiscrepancyExperiment`"
// ---------------------------------------------------------------------
%feature("docstring") OT::WeightedExperiment::generate
"Generate points according to the type of the experiment.
Returns
-------
sample : :class:`~openturns.NumericalSample`
Points :math:`(\\\\Xi_i)_{i \\\\in I}` which constitute the design of experiments
with :math:`card I = size`. The sampling method is defined by the nature of
the weighted experiment.
Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> myExperiment = ot.MonteCarloExperiment(ot.Normal(2), 5)
>>> sample = myExperiment.generate()
>>> print(sample)
[ marginal 1 marginal 2 ]
0 : [ 0.608202 -1.26617 ]
1 : [ -0.438266 1.20548 ]
2 : [ -2.18139 0.350042 ]
3 : [ -0.355007 1.43725 ]
4 : [ 0.810668 0.793156 ]"
// ---------------------------------------------------------------------
%feature("docstring") OT::WeightedExperiment::generateWithWeights
"Generate points and their associated weight according to the type of the experiment.
Returns
-------
sample : :class:`~openturns.NumericalSample`
The points which constitute the design of experiments. The sampling method
is defined by the nature of the experiment.
weights : :class:`~openturns.NumericalPoint` of size :math:`cardI`
Weights :math:`(\\\\omega_i)_{i \\\\in I}` associated with the points. By default,
all the weights are equal to :math:`1/cardI`.
Examples
--------
>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> myExperiment = ot.MonteCarloExperiment(ot.Normal(2), 5)
>>> sample, weights = myExperiment.generateWithWeights()
>>> print(sample)
[ marginal 1 marginal 2 ]
0 : [ 0.608202 -1.26617 ]
1 : [ -0.438266 1.20548 ]
2 : [ -2.18139 0.350042 ]
3 : [ -0.355007 1.43725 ]
4 : [ 0.810668 0.793156 ]
>>> print(weights)
[0.2,0.2,0.2,0.2,0.2]"
// ---------------------------------------------------------------------
%feature("docstring") OT::WeightedExperiment::getDistribution
"Accessor to the distribution.
Returns
-------
distribution : :class:`~openturns.Distribution`
Distribution used to generate the set of input data."
// ---------------------------------------------------------------------
%feature("docstring") OT::WeightedExperiment::setDistribution
"Accessor to the distribution.
Parameters
----------
distribution : :class:`~openturns.Distribution`
Distribution used to generate the set of input data."
// ---------------------------------------------------------------------
%feature("docstring") OT::WeightedExperiment::getSize
"Accessor to the size of the generated sample.
Returns
-------
size : positive int
Number :math:`cardI` of points constituting the design of experiments."
// ---------------------------------------------------------------------
%feature("docstring") OT::WeightedExperiment::setSize
"Accessor to the size of the generated sample.
Parameters
----------
size : positive int
Number :math:`cardI` of points constituting the design of experiments."
// ---------------------------------------------------------------------
%feature("docstring") OT::WeightedExperiment::getWeight
"Accessor to the weights associated with the points.
Returns
-------
weights : :class:`~openturns.NumericalPoint` of size :math:`cardI`
Weights :math:`(\\\\omega_i)_{i \\\\in I}` associated with the points. By default,
all the weights are equal to :math:`1/cardI`."
|