Salome HOME
Minor documentation improvements
[modules/adao.git] / doc / en / ref_algorithm_NonLinearLeastSquares.rst
1 ..
2    Copyright (C) 2008-2020 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 the :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 In all cases, it is recommended to prefer the :ref:`section_ref_algorithm_3DVAR`
43 for its stability as for its behavior during optimization.
44
45 .. ------------------------------------ ..
46 .. include:: snippets/Header2Algo02.rst
47
48 .. include:: snippets/Background.rst
49
50 .. include:: snippets/Observation.rst
51
52 .. include:: snippets/ObservationError.rst
53
54 .. include:: snippets/ObservationOperator.rst
55
56 .. ------------------------------------ ..
57 .. include:: snippets/Header2Algo03AdOp.rst
58
59 Minimizer
60   .. index:: single: Minimizer
61
62   This key allows to choose the optimization minimizer. The default choice is
63   "LBFGSB", and the possible ones are "LBFGSB" (nonlinear constrained
64   minimizer, see [Byrd95]_, [Morales11]_ and [Zhu97]_), "TNC" (nonlinear
65   constrained minimizer), "CG" (nonlinear unconstrained minimizer), "BFGS"
66   (nonlinear unconstrained minimizer), "NCG" (Newton CG minimizer). It is
67   strongly recommended to stay with the default.
68
69   Example :
70   ``{"Minimizer":"LBFGSB"}``
71
72 .. include:: snippets/BoundsWithNone.rst
73
74 .. include:: snippets/MaximumNumberOfSteps.rst
75
76 .. include:: snippets/CostDecrementTolerance.rst
77
78 .. include:: snippets/ProjectedGradientTolerance.rst
79
80 .. include:: snippets/GradientNormTolerance.rst
81
82 StoreSupplementaryCalculations
83   .. index:: single: StoreSupplementaryCalculations
84
85   This list indicates the names of the supplementary variables that can be
86   available at the end of the algorithm, if they are initially required by the
87   user. It involves potentially costly calculations or memory consumptions. The
88   default is a void list, none of these variables being calculated and stored
89   by default excepted the unconditionnal variables. The possible names are in
90   the following list: [
91   "Analysis",
92   "BMA",
93   "CostFunctionJ",
94   "CostFunctionJAtCurrentOptimum",
95   "CostFunctionJb",
96   "CostFunctionJbAtCurrentOptimum",
97   "CostFunctionJo",
98   "CostFunctionJoAtCurrentOptimum",
99   "CurrentOptimum",
100   "CurrentState",
101   "IndexOfOptimum",
102   "Innovation",
103   "InnovationAtCurrentState",
104   "OMA",
105   "OMB",
106   "SimulatedObservationAtBackground",
107   "SimulatedObservationAtCurrentOptimum",
108   "SimulatedObservationAtCurrentState",
109   "SimulatedObservationAtOptimum",
110   ].
111
112   Example :
113   ``{"StoreSupplementaryCalculations":["BMA", "CurrentState"]}``
114
115 *Tips for this algorithm:*
116
117     As the *"BackgroundError"* command is required for ALL the calculation
118     algorithms in the graphical interface ADAO EFICAS, you have to provide a
119     value, even if this command is not required for this algorithm, and will
120     not be used. The simplest way is to give "1" as a STRING.
121
122 .. ------------------------------------ ..
123 .. include:: snippets/Header2Algo04.rst
124
125 .. include:: snippets/Analysis.rst
126
127 .. include:: snippets/CostFunctionJ.rst
128
129 .. include:: snippets/CostFunctionJb.rst
130
131 .. include:: snippets/CostFunctionJo.rst
132
133 .. ------------------------------------ ..
134 .. include:: snippets/Header2Algo05.rst
135
136 .. include:: snippets/Analysis.rst
137
138 .. include:: snippets/BMA.rst
139
140 .. include:: snippets/CostFunctionJ.rst
141
142 .. include:: snippets/CostFunctionJAtCurrentOptimum.rst
143
144 .. include:: snippets/CostFunctionJb.rst
145
146 .. include:: snippets/CostFunctionJbAtCurrentOptimum.rst
147
148 .. include:: snippets/CostFunctionJo.rst
149
150 .. include:: snippets/CostFunctionJoAtCurrentOptimum.rst
151
152 .. include:: snippets/CurrentOptimum.rst
153
154 .. include:: snippets/CurrentState.rst
155
156 .. include:: snippets/IndexOfOptimum.rst
157
158 .. include:: snippets/Innovation.rst
159
160 .. include:: snippets/InnovationAtCurrentState.rst
161
162 .. include:: snippets/OMA.rst
163
164 .. include:: snippets/OMB.rst
165
166 .. include:: snippets/SimulatedObservationAtBackground.rst
167
168 .. include:: snippets/SimulatedObservationAtCurrentOptimum.rst
169
170 .. include:: snippets/SimulatedObservationAtCurrentState.rst
171
172 .. include:: snippets/SimulatedObservationAtOptimum.rst
173
174 .. ------------------------------------ ..
175 .. include:: snippets/Header2Algo09.rst
176
177 .. literalinclude:: scripts/simple_NonLinearLeastSquares.py
178
179 .. include:: snippets/Header2Algo10.rst
180
181 .. literalinclude:: scripts/simple_NonLinearLeastSquares.res
182
183 .. ------------------------------------ ..
184 .. include:: snippets/Header2Algo06.rst
185
186 - :ref:`section_ref_algorithm_3DVAR`
187
188 .. ------------------------------------ ..
189 .. include:: snippets/Header2Algo07.rst
190
191 - [Byrd95]_
192 - [Morales11]_
193 - [Zhu97]_