Salome HOME
Documentation update with features and review corrections
[modules/adao.git] / doc / en / ref_algorithm_NonLinearLeastSquares.rst
1 ..
2    Copyright (C) 2008-2024 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: NonLinearLeastSquares
25 .. _section_ref_algorithm_NonLinearLeastSquares:
26
27 Calculation algorithm "*NonLinearLeastSquares*"
28 -----------------------------------------------
29
30 .. ------------------------------------ ..
31 .. include:: snippets/Header2Algo01.rst
32
33 This algorithm realizes a state estimation by variational minimization of the
34 classical :math:`J` function of weighted "Least Squares":
35
36 .. math:: J(\mathbf{x})=(\mathbf{y}^o-\mathbf{H}.\mathbf{x})^T.\mathbf{R}^{-1}.(\mathbf{y}^o-\mathbf{H}.\mathbf{x})
37
38 It is similar to a :ref:`section_ref_algorithm_3DVAR`, without its background
39 part. The background, required in the interface, is only used as an initial
40 point for the variational minimization.
41
42 This mono-objective optimization algorithm is naturally written for a single
43 estimate, without any dynamic or iterative notion (there is no need in this
44 case for an incremental evolution operator, nor for an evolution error
45 covariance). In ADAO, it can also be used on a succession of observations,
46 placing the estimate in a recursive framework partly similar to a Kalman
47 Filter. A standard estimate is made at each observation step on the state
48 predicted by the incremental evolution model.
49
50 In all cases, it is recommended to prefer a :ref:`section_ref_algorithm_3DVAR`
51 for its stability as for its behavior during optimization.
52
53 .. ------------------------------------ ..
54 .. include:: snippets/Header2Algo12.rst
55
56 .. include:: snippets/FeaturePropLocalOptimization.rst
57
58 .. include:: snippets/FeaturePropDerivativeNeeded.rst
59
60 .. include:: snippets/FeaturePropParallelDerivativesOnly.rst
61
62 .. ------------------------------------ ..
63 .. include:: snippets/Header2Algo02.rst
64
65 .. include:: snippets/Background.rst
66
67 .. include:: snippets/Observation.rst
68
69 .. include:: snippets/ObservationError.rst
70
71 .. include:: snippets/ObservationOperator.rst
72
73 .. ------------------------------------ ..
74 .. include:: snippets/Header2Algo03AdOp.rst
75
76 .. include:: snippets/BoundsWithNone.rst
77
78 .. include:: snippets/CostDecrementTolerance.rst
79
80 .. include:: snippets/EstimationOf_Parameters.rst
81
82 .. include:: snippets/GradientNormTolerance.rst
83
84 .. include:: snippets/InitializationPoint.rst
85
86 .. include:: snippets/MaximumNumberOfIterations.rst
87
88 .. include:: snippets/Minimizer_xDVAR.rst
89
90 .. include:: snippets/ProjectedGradientTolerance.rst
91
92
93 StoreSupplementaryCalculations
94   .. index:: single: StoreSupplementaryCalculations
95
96   *List of names*. This list indicates the names of the supplementary
97   variables, that can be available during or at the end of the algorithm, if
98   they are initially required by the user. Their availability involves,
99   potentially, costly calculations or memory consumptions. The default is then
100   a void list, none of these variables being calculated and stored by default
101   (excepted the unconditional variables). The possible names are in the
102   following list (the detailed description of each named variable is given in
103   the following part of this specific algorithmic documentation, in the
104   sub-section "*Information and variables available at the end of the
105   algorithm*"): [
106   "Analysis",
107   "BMA",
108   "CostFunctionJ",
109   "CostFunctionJAtCurrentOptimum",
110   "CostFunctionJb",
111   "CostFunctionJbAtCurrentOptimum",
112   "CostFunctionJo",
113   "CostFunctionJoAtCurrentOptimum",
114   "CurrentIterationNumber",
115   "CurrentOptimum",
116   "CurrentState",
117   "CurrentStepNumber",
118   "ForecastState",
119   "IndexOfOptimum",
120   "Innovation",
121   "InnovationAtCurrentAnalysis",
122   "InnovationAtCurrentState",
123   "OMA",
124   "OMB",
125   "SimulatedObservationAtBackground",
126   "SimulatedObservationAtCurrentOptimum",
127   "SimulatedObservationAtCurrentState",
128   "SimulatedObservationAtOptimum",
129   ].
130
131   Example :
132   ``{"StoreSupplementaryCalculations":["CurrentState", "Residu"]}``
133
134 *Tips for this algorithm:*
135
136     As the *"BackgroundError"* command is required for ALL the calculation
137     algorithms in the graphical interface ADAO EFICAS, you have to provide a
138     value, even if this command is not required for this algorithm, and will
139     not be used. The simplest way is to give "1" as a STRING.
140
141 .. ------------------------------------ ..
142 .. include:: snippets/Header2Algo04.rst
143
144 .. include:: snippets/Analysis.rst
145
146 .. include:: snippets/CostFunctionJ.rst
147
148 .. include:: snippets/CostFunctionJb.rst
149
150 .. include:: snippets/CostFunctionJo.rst
151
152 .. ------------------------------------ ..
153 .. include:: snippets/Header2Algo05.rst
154
155 .. include:: snippets/Analysis.rst
156
157 .. include:: snippets/BMA.rst
158
159 .. include:: snippets/CostFunctionJ.rst
160
161 .. include:: snippets/CostFunctionJAtCurrentOptimum.rst
162
163 .. include:: snippets/CostFunctionJb.rst
164
165 .. include:: snippets/CostFunctionJbAtCurrentOptimum.rst
166
167 .. include:: snippets/CostFunctionJo.rst
168
169 .. include:: snippets/CostFunctionJoAtCurrentOptimum.rst
170
171 .. include:: snippets/CurrentIterationNumber.rst
172
173 .. include:: snippets/CurrentOptimum.rst
174
175 .. include:: snippets/CurrentState.rst
176
177 .. include:: snippets/CurrentStepNumber.rst
178
179 .. include:: snippets/ForecastState.rst
180
181 .. include:: snippets/IndexOfOptimum.rst
182
183 .. include:: snippets/Innovation.rst
184
185 .. include:: snippets/InnovationAtCurrentAnalysis.rst
186
187 .. include:: snippets/InnovationAtCurrentState.rst
188
189 .. include:: snippets/OMA.rst
190
191 .. include:: snippets/OMB.rst
192
193 .. include:: snippets/SimulatedObservationAtBackground.rst
194
195 .. include:: snippets/SimulatedObservationAtCurrentOptimum.rst
196
197 .. include:: snippets/SimulatedObservationAtCurrentState.rst
198
199 .. include:: snippets/SimulatedObservationAtOptimum.rst
200
201 .. ------------------------------------ ..
202 .. _section_ref_algorithm_NonLinearLeastSquares_examples:
203
204 .. include:: snippets/Header2Algo09.rst
205
206 .. include:: scripts/simple_NonLinearLeastSquares.rst
207
208 .. literalinclude:: scripts/simple_NonLinearLeastSquares.py
209
210 .. include:: snippets/Header2Algo10.rst
211
212 .. literalinclude:: scripts/simple_NonLinearLeastSquares.res
213
214 .. include:: snippets/Header2Algo11.rst
215
216 .. _simple_NonLinearLeastSquares:
217 .. image:: scripts/simple_NonLinearLeastSquares.png
218   :align: center
219   :width: 90%
220
221 .. ------------------------------------ ..
222 .. include:: snippets/Header2Algo06.rst
223
224 - :ref:`section_ref_algorithm_LinearLeastSquares`
225 - :ref:`section_ref_algorithm_3DVAR`
226 - :ref:`section_ref_algorithm_LinearityTest`
227
228 .. ------------------------------------ ..
229 .. include:: snippets/Header2Algo07.rst
230
231 - [Byrd95]_
232 - [Morales11]_
233 - [Zhu97]_