2 Copyright (C) 2008-2023 EDF R&D
4 This file is part of SALOME ADAO module.
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.
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.
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
20 See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
24 .. index:: single: SamplingTest
25 .. _section_ref_algorithm_SamplingTest:
27 Checking algorithm "*SamplingTest*"
28 -----------------------------------
30 .. ------------------------------------ ..
31 .. include:: snippets/Header2Algo01.rst
33 This test algorithm is used to establish the collection of values of an error
34 functional :math:`J` of type :math:`L^1`, :math:`L^2` or :math:`L^{\infty}`,
35 with or without weights, using the observation operator :math:`\mathcal{H}`,
36 for an a priori given sample of states :math:`\mathbf{x}`. The default error
37 functional is the augmented weighted least squares functional, classically used
38 in data assimilation, using in addition to observations :math:`\mathbf{y}^o`.
40 This test is useful for analyzing the sensitivity of the functional :math:`J`
41 to variations in the state :math:`\mathbf{x}` in particular.
43 The sampling of the states :math:`\mathbf{x}` can be given explicitly or under
44 form of hypercubes, explicit or sampled according to classic distributions, or
45 using Latin hypercube sampling (LHS). The computations are optimized according
46 to the computer resources available and the options requested by the user.
47 Beware of the size of the hypercube (and then to the number of computations)
48 that can be reached, it can grow quickly to be quite large. When a state is not
49 observable, a *"NaN"* value is returned.
51 It is also possible to supply a set of simulations :math:`\mathbf{y}` already
52 established elsewhere (so there's no explicit need for an operator
53 :math:`\mathcal{H}`), which are implicitly associated with a set of state
54 samples :math:`\mathbf{x}`. In this case where the set of simulations is
55 provided, it is imperative to also provide the set of states :math:`\mathbf{x}`
56 by explicit sampling, whose state order corresponds to the order of the
57 simulations :math:`\mathbf{y}`.
59 To access the calculated information, the results of the sampling or
60 simulations must be requested **explicitly** to avoid storage difficulties (if
61 no results are requested, nothing is available). One use for that, on the
62 desired variable, the final saving through "*UserPostAnalysis*" or the
63 treatment during the calculation by well suited "*observer*".
65 .. ------------------------------------ ..
66 .. include:: snippets/Header2Algo02.rst
68 .. include:: snippets/CheckingPoint.rst
70 .. include:: snippets/BackgroundError.rst
72 .. include:: snippets/Observation.rst
74 .. include:: snippets/ObservationError.rst
76 .. include:: snippets/ObservationOperator.rst
78 .. ------------------------------------ ..
79 .. include:: snippets/Header2Algo03Chck.rst
81 .. include:: snippets/EnsembleOfSnapshots.rst
83 .. include:: snippets/QualityCriterion.rst
85 .. include:: snippets/SampleAsExplicitHyperCube.rst
87 .. include:: snippets/SampleAsIndependantRandomVariables.rst
89 .. include:: snippets/SampleAsMinMaxLatinHyperCube.rst
91 .. include:: snippets/SampleAsMinMaxStepHyperCube.rst
93 .. include:: snippets/SampleAsnUplet.rst
95 .. include:: snippets/SetDebug.rst
97 .. include:: snippets/SetSeed.rst
99 StoreSupplementaryCalculations
100 .. index:: single: StoreSupplementaryCalculations
102 *List of names*. This list indicates the names of the supplementary
103 variables, that can be available during or at the end of the algorithm, if
104 they are initially required by the user. Their availability involves,
105 potentially, costly calculations or memory consumptions. The default is then
106 a void list, none of these variables being calculated and stored by default
107 (excepted the unconditional variables). The possible names are in the
108 following list (the detailed description of each named variable is given in
109 the following part of this specific algorithmic documentation, in the
110 sub-section "*Information and variables available at the end of the
116 "EnsembleOfSimulations",
119 "InnovationAtCurrentState",
120 "SimulatedObservationAtCurrentState",
124 ``{"StoreSupplementaryCalculations":["CurrentState", "Residu"]}``
126 .. ------------------------------------ ..
127 .. include:: snippets/Header2Algo04.rst
129 .. include:: snippets/CostFunctionJ.rst
131 .. include:: snippets/CostFunctionJb.rst
133 .. include:: snippets/CostFunctionJo.rst
135 .. ------------------------------------ ..
136 .. include:: snippets/Header2Algo05.rst
138 .. include:: snippets/CostFunctionJ.rst
140 .. include:: snippets/CostFunctionJb.rst
142 .. include:: snippets/CostFunctionJo.rst
144 .. include:: snippets/CurrentState.rst
146 .. include:: snippets/EnsembleOfSimulations.rst
148 .. include:: snippets/EnsembleOfStates.rst
150 .. include:: snippets/Innovation.rst
152 .. include:: snippets/InnovationAtCurrentState.rst
154 .. include:: snippets/SimulatedObservationAtCurrentState.rst
156 .. ------------------------------------ ..
157 .. _section_ref_algorithm_SamplingTest_examples:
159 .. include:: snippets/Header2Algo06.rst
161 - :ref:`section_ref_algorithm_FunctionTest`
162 - :ref:`section_ref_algorithm_LocalSensitivityTest`
164 .. ------------------------------------ ..
165 .. include:: snippets/Header2Algo08.rst
167 - OPENTURNS, see the *User guide of OPENTURNS module* in the main "*Help*" menu of SALOME platform