English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Optimizer: TBestEstimate.h Source File
Uranie / Optimizer  v4.10.0
/* @license-end */
TBestEstimate.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2024 CEA/DES
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as published
6 // by the Free Software Foundation, either version 3 of the License, or any
7 // later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 // $Id$
19 // $Author$
20 // $Date$
21 // $Revision$
22 // $State$
24 
41 #ifndef TBESTESTIMATE_H
42 #define TBESTESTIMATE_H
43 
44 #include <iostream>
45 
46 //ROOT
47 #include "Rtypes.h"
48 #include "TNamed.h"
49 #include "TMatrixD.h"
50 
51 // Uranie
52 #include "Optimizer.h"
53 #include "TDataServer.h"
54 
55 using namespace URANIE::DataServer;
56 
57 namespace URANIE
58 {
59 namespace Optimizer
60 {
61 class TBestEstimate: public TNamed
62 {
63 private:
64  // Log
65  Bool_t _blog;
66 
67  // Data sets
68  TDataServer *_tdsParam;
69  TDataServer *_tdsResp;
70  TDataServer *_tdsMeas;
71  TDataServer *_tdsOAT;
72 
73  // matrix dimensions
74  Int_t _nParam;
75  Int_t _nResp;
78 
79  // user provided data
80  TMatrixD _a, _m, _r;
81  TMatrixD _ca, _cm;
82  TMatrixD _car;
83  TMatrixD _s;
84 
85  // Calculated data
86  TMatrixD _d;
87  TMatrixD _cr, _cd;
88  TMatrixD _aBE, _rBE;
89  TMatrixD _caBE, _crBE;
90  TMatrixD _carBE;
91  Double_t _chi2;
92 
93 public:
94  //---------------------------------------------
98  TBestEstimate();
100 
102 
116  TBestEstimate(Int_t nParam, TMatrixD a, Int_t nResp, TMatrixD m, TMatrixD r,
117  TMatrixD ca, TMatrixD cm, TMatrixD s, TMatrixD car);
118 
120 
133  TBestEstimate(TDataServer *tdsParam, TDataServer *tdsMeasures,
134  TDataServer *tdsResponses, TMatrixD sMatrix, TMatrixD carMatrix);
135 
137 
153  TBestEstimate(TDataServer *tdsParam, TDataServer *tdsMeasures,
154  TDataServer *tdsResponses, TDataServer *tdsOATSampling,
155  TMatrixD carMatrix);
156 
158  virtual ~TBestEstimate();
160 
161  //---------------------------------------------
165  void setParameterData(TDataServer *tds);
166  TDataServer* getParameterData()
167  {
168  return _tdsParam;
169  }
170 
171  void setMeasureData(TDataServer *tds);
172  TDataServer* getMeasureData()
173  {
174  return _tdsMeas;
175  }
176 
177  void setResponseData(TDataServer *tds);
178  TDataServer* getResponseData()
179  {
180  return _tdsResp;
181  }
182 
183  void setOATSamplingData(TDataServer *tds);
184  TDataServer* getOATSamplingData()
185  {
186  return _tdsOAT;
187  }
188 
189  void setSensitivityMatrix(TMatrixD matrix);
191  {
192  return _s;
193  }
194 
195  void setParameterResponseCovMatrix(TMatrixD matrix);
197  {
198  return _car;
199  }
200 
202  {
203  return _a;
204  }
205  TMatrixD getMeasureMatrix()
206  {
207  return _m;
208  }
209  TMatrixD getResponseMatrix()
210  {
211  return _r;
212  }
214  {
215  return _ca;
216  }
218  {
219  return _cm;
220  }
222  {
223  return _cr;
224  }
226  {
227  return _cd;
228  }
229 
231  {
232  return _aBE;
233  }
235  {
236  return _rBE;
237  }
239  {
240  return _caBE;
241  }
243  {
244  return _crBE;
245  }
247  {
248  return _carBE;
249  }
250 
251  Double_t getChi2()
252  {
253  return _chi2;
254  }
256  {
257  return _chi2 / (_nResp * _nRespTimeSteps);
258  }
259 
261  {
262  return _nParam;
263  }
264 
266  {
267  return _nResp;
268  }
269 
271  {
272  return _nParamTimeSteps;
273  }
274 
276  {
277  return _nRespTimeSteps;
278  }
279 
280 
282 
283  //---------------------------------------------
287  void buildMatrices();
288  void buildSensitivityMatrix();
289  void runBestEstimate();
291  //---------------------------------------------
295  void setLog()
297  {
298  _blog = kTRUE;
299  }
300  void unsetLog()
301  {
302  _blog = kFALSE;
303  }
304  void changeLog()
305  {
306  _blog = _blog ? kFALSE : kTRUE;
307  }
308  Bool_t getLog()
309  {
310  return _blog;
311  }
312  virtual void printLog(Option_t *option = "");
314 
315  ClassDef(URANIE::Optimizer::TBestEstimate, ID_OPTIMIZER)
316 };
317 
318 } // Fin du namespace Optimizer
319 } // Fin du namespace URANIE
320 #endif
Rosenbrock&#39;s function (n=2) with first and second order derivatives.
Definition: TBestEstimate.h:57
TMatrixD getResponseMatrix()
Definition: TBestEstimate.h:209
TDataServer * _tdsMeas
Definition: TBestEstimate.h:70
Int_t _nResp
Definition: TBestEstimate.h:75
TMatrixD _r
Definition: TBestEstimate.h:80
TDataServer * getMeasureData()
Definition: TBestEstimate.h:172
void unsetLog()
Definition: TBestEstimate.h:300
TMatrixD getBestEstParameterResponsesCovMatrix()
Definition: TBestEstimate.h:246
TDataServer * _tdsParam
Definition: TBestEstimate.h:68
TMatrixD _cr
Definition: TBestEstimate.h:87
TDataServer * _tdsResp
Definition: TBestEstimate.h:69
Int_t getNTimeStepsInputParameter()
Definition: TBestEstimate.h:270
void changeLog()
Definition: TBestEstimate.h:304
TMatrixD _car
Definition: TBestEstimate.h:82
Description of the class TBestEstimate.
Definition: TBestEstimate.h:61
TMatrixD getMeasureCovMatrix()
Definition: TBestEstimate.h:217
Int_t _nParam
Definition: TBestEstimate.h:74
TDataServer * _tdsOAT
Definition: TBestEstimate.h:71
TMatrixD getBestEstResponseMatrix()
Definition: TBestEstimate.h:234
Int_t _nRespTimeSteps
Definition: TBestEstimate.h:77
TMatrixD getDifferencesCovMatrix()
Definition: TBestEstimate.h:225
TMatrixD getParameterCovMatrix()
Definition: TBestEstimate.h:213
TMatrixD getBestEstParameterMatrix()
Definition: TBestEstimate.h:230
TMatrixD getSensitivityMatrix()
Definition: TBestEstimate.h:190
TDataServer * getResponseData()
Definition: TBestEstimate.h:178
Int_t getNInputParameter()
Definition: TBestEstimate.h:260
TMatrixD getParameterMatrix()
Definition: TBestEstimate.h:201
TDataServer * getParameterData()
Definition: TBestEstimate.h:166
Int_t getNTimeStepsResponses()
Definition: TBestEstimate.h:275
TMatrixD getParameterResponseCovMatrix()
Definition: TBestEstimate.h:196
TDataServer * getOATSamplingData()
Definition: TBestEstimate.h:184
TMatrixD _crBE
Definition: TBestEstimate.h:89
TMatrixD _rBE
Definition: TBestEstimate.h:88
Double_t _chi2
Definition: TBestEstimate.h:91
TMatrixD _s
Definition: TBestEstimate.h:83
TMatrixD getBestEstParameterCovMatrix()
Definition: TBestEstimate.h:238
TMatrixD _cm
Definition: TBestEstimate.h:81
Bool_t _blog
Definition: TBestEstimate.h:65
Double_t getChi2()
Definition: TBestEstimate.h:251
Int_t getNResponses()
Definition: TBestEstimate.h:265
TMatrixD _carBE
Definition: TBestEstimate.h:90
TMatrixD _d
Definition: TBestEstimate.h:86
Bool_t getLog()
Definition: TBestEstimate.h:308
TMatrixD getBestEstResponsesCovMatrix()
Definition: TBestEstimate.h:242
Int_t _nParamTimeSteps
Definition: TBestEstimate.h:76
TMatrixD getMeasureMatrix()
Definition: TBestEstimate.h:205
Double_t getConsistencyMeasure()
Definition: TBestEstimate.h:255
TMatrixD getResponsesCovMatrix()
Definition: TBestEstimate.h:221