Salome HOME
Minor documentation and code review corrections (40)
[modules/adao.git] / doc / en / ref_algorithm_SamplingTest.rst
1 ..
2    Copyright (C) 2008-2023 EDF R&D
3
4    This file is part of SALOME ADAO module.
5
6    This library is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public
8    License as published by the Free Software Foundation; either
9    version 2.1 of the License, or (at your option) any later version.
10
11    This library is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
15
16    You should have received a copy of the GNU Lesser General Public
17    License along with this library; if not, write to the Free Software
18    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19
20    See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
22    Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
23
24 .. index:: single: SamplingTest
25 .. _section_ref_algorithm_SamplingTest:
26
27 Checking algorithm "*SamplingTest*"
28 -----------------------------------
29
30 .. ------------------------------------ ..
31 .. include:: snippets/Header2Algo01.rst
32
33 This algorithm allows to calculate the values, linked to a :math:`\mathbf{x}`
34 state, of a general error function :math:`J` of type :math:`L^1`, :math:`L^2`
35 or :math:`L^{\infty}`, with or without weights, and of the observation
36 operator, for an priori given :math:`\mathbf{x}` states sample. The default
37 error function is the augmented weighted least squares function, classically
38 used in data assimilation, using observation :math:`\mathbf{y}^o`.
39
40 It is useful to test the sensitivity, of the error function :math:`J`, in
41 particular, to the state :math:`\mathbf{x}` variations. When a state is not
42 observable, a *"NaN"* value is returned.
43
44 The sampling of the states :math:`\mathbf{x}` can be given explicitly or under
45 form of hyper-cubes, explicit or sampled according to classic distributions.
46 Beware of the size of the hyper-cube (and then to the number of computations)
47 that can be reached, it can grow quickly to be quite large.
48
49 To be visible by the user while reducing the risk of storage difficulties, the
50 results of sampling or simulations has to be **explicitly** asked for. One use
51 for that, on the desired variable, the final saving through
52 "*UserPostAnalysis*" or the treatment during the calculation by "*observer*".
53
54 To perform distributed or more complex sampling, see OPENTURNS module available
55 in SALOME.
56
57 .. ------------------------------------ ..
58 .. include:: snippets/Header2Algo02.rst
59
60 .. include:: snippets/CheckingPoint.rst
61
62 .. include:: snippets/BackgroundError.rst
63
64 .. include:: snippets/Observation.rst
65
66 .. include:: snippets/ObservationError.rst
67
68 .. include:: snippets/ObservationOperator.rst
69
70 .. ------------------------------------ ..
71 .. include:: snippets/Header2Algo03Chck.rst
72
73 .. include:: snippets/QualityCriterion.rst
74
75 .. include:: snippets/SampleAsExplicitHyperCube.rst
76
77 .. include:: snippets/SampleAsIndependantRandomVariables.rst
78
79 .. include:: snippets/SampleAsMinMaxStepHyperCube.rst
80
81 .. include:: snippets/SampleAsnUplet.rst
82
83 .. include:: snippets/SetDebug.rst
84
85 .. include:: snippets/SetSeed.rst
86
87 StoreSupplementaryCalculations
88   .. index:: single: StoreSupplementaryCalculations
89
90   *List of names*. This list indicates the names of the supplementary
91   variables, that can be available during or at the end of the algorithm, if
92   they are initially required by the user. Their avalability involves,
93   potentially, costly calculations or memory consumptions. The default is then
94   a void list, none of these variables being calculated and stored by default
95   (excepted the unconditionnal variables). The possible names are in the
96   following list (the detailed description of each named variable is given in
97   the following part of this specific algorithmic documentation, in the
98   sub-section "*Information and variables available at the end of the
99   algorithm*"): [
100   "CostFunctionJ",
101   "CostFunctionJb",
102   "CostFunctionJo",
103   "CurrentState",
104   "EnsembleOfSimulations",
105   "EnsembleOfStates",
106   "Innovation",
107   "InnovationAtCurrentState",
108   "SimulatedObservationAtCurrentState",
109   ].
110
111   Example :
112   ``{"StoreSupplementaryCalculations":["CurrentState", "Residu"]}``
113
114 .. ------------------------------------ ..
115 .. include:: snippets/Header2Algo04.rst
116
117 .. include:: snippets/CostFunctionJ.rst
118
119 .. include:: snippets/CostFunctionJb.rst
120
121 .. include:: snippets/CostFunctionJo.rst
122
123 .. ------------------------------------ ..
124 .. include:: snippets/Header2Algo05.rst
125
126 .. include:: snippets/CostFunctionJ.rst
127
128 .. include:: snippets/CostFunctionJb.rst
129
130 .. include:: snippets/CostFunctionJo.rst
131
132 .. include:: snippets/CurrentState.rst
133
134 .. include:: snippets/EnsembleOfSimulations.rst
135
136 .. include:: snippets/EnsembleOfStates.rst
137
138 .. include:: snippets/Innovation.rst
139
140 .. include:: snippets/InnovationAtCurrentState.rst
141
142 .. include:: snippets/SimulatedObservationAtCurrentState.rst
143
144 .. ------------------------------------ ..
145 .. _section_ref_algorithm_SamplingTest_examples:
146
147 .. include:: snippets/Header2Algo06.rst
148
149 - :ref:`section_ref_algorithm_FunctionTest`
150 - :ref:`section_ref_algorithm_LocalSensitivityTest`
151
152 .. ------------------------------------ ..
153 .. include:: snippets/Header2Algo08.rst
154
155 - OPENTURNS, see the *User guide of OPENTURNS module* in the main "*Help*" menu of SALOME platform