Salome HOME
Extending sampling control and output
[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` or
35 :math:`L^{\infty}`, with or without weights, and of the observation operator,
36 for an priori given states sample. The default error function is the augmented
37 weighted least squares function, classically used in data assimilation.
38
39 It is useful to test the sensitivity, of the error function :math:`J`, in
40 particular, to the state :math:`\mathbf{x}` variations. When a state is not
41 observable, a *"NaN"* value is returned.
42
43 The sampling of the states :math:`\mathbf{x}` can be given explicitly or under
44 the form of hyper-cubes, explicit or sampled using classic distributions. Be
45 careful to the size of the hyper-cube (and then to the number of calculations)
46 that can be reached, it can be big very quickly.
47
48 To be visible by the user, the results of sampling has to be explicitly asked
49 for. One use for that, on the desired variable, the final saving through
50 "*UserPostAnalysis*" or the treatment during the calculation by "*observer*".
51
52 To perform distributed or more complex sampling, see OPENTURNS module available
53 in SALOME.
54
55 .. ------------------------------------ ..
56 .. include:: snippets/Header2Algo02.rst
57
58 .. include:: snippets/CheckingPoint.rst
59
60 .. include:: snippets/BackgroundError.rst
61
62 .. include:: snippets/Observation.rst
63
64 .. include:: snippets/ObservationError.rst
65
66 .. include:: snippets/ObservationOperator.rst
67
68 .. ------------------------------------ ..
69 .. include:: snippets/Header2Algo03Chck.rst
70
71 .. include:: snippets/QualityCriterion.rst
72
73 .. include:: snippets/SampleAsExplicitHyperCube.rst
74
75 .. include:: snippets/SampleAsIndependantRandomVariables.rst
76
77 .. include:: snippets/SampleAsMinMaxStepHyperCube.rst
78
79 .. include:: snippets/SampleAsnUplet.rst
80
81 .. include:: snippets/SetDebug.rst
82
83 .. include:: snippets/SetSeed.rst
84
85 StoreSupplementaryCalculations
86   .. index:: single: StoreSupplementaryCalculations
87
88   *List of names*. This list indicates the names of the supplementary
89   variables, that can be available during or at the end of the algorithm, if
90   they are initially required by the user. Their avalability involves,
91   potentially, costly calculations or memory consumptions. The default is then
92   a void list, none of these variables being calculated and stored by default
93   (excepted the unconditionnal variables). The possible names are in the
94   following list (the detailed description of each named variable is given in
95   the following part of this specific algorithmic documentation, in the
96   sub-section "*Information and variables available at the end of the
97   algorithm*"): [
98   "CostFunctionJ",
99   "CostFunctionJb",
100   "CostFunctionJo",
101   "CurrentState",
102   "EnsembleOfSimulations",
103   "EnsembleOfStates",
104   "InnovationAtCurrentState",
105   "SimulatedObservationAtCurrentState",
106   ].
107
108   Example :
109   ``{"StoreSupplementaryCalculations":["BMA", "CurrentState"]}``
110
111 .. ------------------------------------ ..
112 .. include:: snippets/Header2Algo04.rst
113
114 .. include:: snippets/CostFunctionJ.rst
115
116 .. include:: snippets/CostFunctionJb.rst
117
118 .. include:: snippets/CostFunctionJo.rst
119
120 .. ------------------------------------ ..
121 .. include:: snippets/Header2Algo05.rst
122
123 .. include:: snippets/CostFunctionJ.rst
124
125 .. include:: snippets/CostFunctionJb.rst
126
127 .. include:: snippets/CostFunctionJo.rst
128
129 .. include:: snippets/CurrentState.rst
130
131 .. include:: snippets/EnsembleOfSimulations.rst
132
133 .. include:: snippets/EnsembleOfStates.rst
134
135 .. include:: snippets/InnovationAtCurrentState.rst
136
137 .. include:: snippets/SimulatedObservationAtCurrentState.rst
138
139 .. ------------------------------------ ..
140 .. _section_ref_algorithm_SamplingTest_examples:
141 .. include:: snippets/Header2Algo06.rst
142
143 - :ref:`section_ref_algorithm_FunctionTest`
144 - :ref:`section_ref_algorithm_LocalSensitivityTest`
145
146 .. ------------------------------------ ..
147 .. include:: snippets/Header2Algo08.rst
148
149 - OPENTURNS, see the *User guide of OPENTURNS module* in the main "*Help*" menu of SALOME platform