English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Uncertainty Modeler: TTester.h Source File
Uranie / Uncertainty Modeler v4.9.0
/* @license-end */
TTester.h
Go to the documentation of this file.
1
2// 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
45#ifndef TTESTER_H
46#define TTESTER_H
47
48// ROOT
49#include "TNamed.h"
50#include "Math/ProbFuncMathCore.h"
51#include "TList.h"
52#include "TVector.h"
53
54// Uranie
55#include "UncertModeler.h"
56#include "TDataServer.h"
57
58namespace URANIE
59{
60namespace UncertModeler
61{
62class TTester: public TNamed
63{
64 // Attributes
65
66protected:
67 Long64_t _nS;
68 Double_t _pValue;
69 Double_t _dScore;
70 Double_t _dModifiedScore;
71 TString _sAttributes;
72 TList* _listOfLaws;
73 Bool_t _bDrawSame;
74
75public:
86 URANIE::DataServer::TDataServer *_tds;
87 Bool_t _blog;
88 Bool_t _bquiet;
89
90public:
91 //---------------------------------------------
95
96 TTester(URANIE::DataServer::TDataServer *tds, ETestType nTestType,
97 const char *varexpinput, Option_t * option = "");
98
100 virtual ~TTester();
102
103 //---------------------------------------------
107 Int_t getID()
108 {
109 return ID_UNCERTMODELER;
110 }
112 Double_t getScore()
113 {
114 return _dScore;
115 }
118 {
119 return _dModifiedScore;
120 }
122 Double_t getPValue()
123 {
124 return _pValue;
125 }
126
140 {
141 return _nCase;
142 }
144
145 //---------------------------------------------
149
153 Double_t computeScore(Option_t * option = "");
155
159 virtual Double_t computeTheCurrentScore(Int_t i, Double_t dzi) = 0;
162 URANIE::DataServer::TStochasticAttribute::ELawType tlaw) = 0;
163
165 virtual const char * getTitleStatistic() = 0;
166
168
174 void addUniformLaw(Double_t min, Double_t max, Color_t color = kBlack, TString stitle = "");
175
177
183 void addNormalLaw(Double_t mu, Double_t sigma, Color_t color = kBlack, TString stitle = "");
184
186
192 void addLogNormalLaw(Double_t mu, Double_t sigma, Color_t color = kBlack, TString stitle = "");
193
205 void addWeibullLaw(Double_t beta, Double_t m, Color_t color = kBlack, TString stitle = "");
206
218 void addGammaLaw(Double_t alpha, Double_t beta, Color_t color = kBlack, TString stitle = "");
219
221
229 void addBetaLaw(Double_t alpha, Double_t beta, Double_t min, Double_t max, Color_t color = kBlack, TString stitle = "");
230
232
237 void treatOption(Option_t * option);
239
240
241 //---------------------------------------------
254 void computePValue(URANIE::DataServer::TStochasticAttribute::ELawType tlaw);
255
256
262 Double_t computePValue_KS_CaseAll(Double_t dz);
263
264
278 Double_t computePValue_AD_Case0(Double_t dz);
279
286 Double_t computePValue_AD_Case3(Double_t dz, URANIE::DataServer::TStochasticAttribute::ELawType tlaw);
287
294 Double_t computePValue_CvM_Case3(Double_t dz, URANIE::DataServer::TStochasticAttribute::ELawType tlaw);
296
297 //---------------------------------------------
301 void setLog()
302 {
303 _blog = kTRUE;
304 }
305 void unsetLog()
306 {
307 _blog = kFALSE;
308 }
310 {
311 _blog = _blog ? kFALSE : kTRUE;
312 }
313 Bool_t getLog()
314 {
315 return _blog;
316 }
317 virtual void printLog(Option_t *option = "");
319
320protected:
321 //---------------------------------------------
325
331 void findParametersLaw(TString soption, TVectorD &vec);
332
333 Int_t nTimesValueLTvalVector(Double_t dval, TVectorD vecValues);
334
335 TGraph *createGraph(Color_t color = kBlack);
336
338
339 ClassDef(URANIE::UncertModeler::TTester, ID_UNCERTMODELER)
340 // Tester classe
341};
342} // Fin du namespace UncertModeler
343} // Fin du namespace URANIE
344#endif
Description of the class TTester.
Definition TTester.h:63
virtual void printLog(Option_t *option="")
void addUniformLaw(Double_t min, Double_t max, Color_t color=kBlack, TString stitle="")
Add in the current graph the CDF of a uniform law defined by theses parameters .
virtual const char * getTitleStatistic()=0
Return the name of the statistic.
TString _sAttributes
The string of attributes separated by the colon ":" character.
Definition TTester.h:71
void addLogNormalLaw(Double_t mu, Double_t sigma, Color_t color=kBlack, TString stitle="")
Adds in the current graph the CDF of a LogNormal law defined by theses parameters of the law.
ECase getCase()
getCaseOfGoF
Definition TTester.h:139
Double_t computePValue_AD_Case3(Double_t dz, URANIE::DataServer::TStochasticAttribute::ELawType tlaw)
Compute the PValue of the test AD in case Case3 (all parameters of the PDF are estimated by MLE)
void computePValue(URANIE::DataServer::TStochasticAttribute::ELawType tlaw)
Compute the PValue of the test.
void addNormalLaw(Double_t mu, Double_t sigma, Color_t color=kBlack, TString stitle="")
Add in the current graph the CDF of a normal law defined by theses parameters .
Double_t computeScore(Option_t *option="")
Compute the score of the statistic.
void setLog()
Definition TTester.h:301
Long64_t _nS
the size of selected values
Definition TTester.h:67
Int_t nTimesValueLTvalVector(Double_t dval, TVectorD vecValues)
void changeLog()
Definition TTester.h:309
TTester(URANIE::DataServer::TDataServer *tds, ETestType nTestType, const char *varexpinput, Option_t *option="")
Constructor by the type of Test.
void findParametersLaw(TString soption, TVectorD &vec)
Finds the parameters in the option string.
Int_t getID()
Definition TTester.h:107
void addGammaLaw(Double_t alpha, Double_t beta, Color_t color=kBlack, TString stitle="")
Adds in the current graph the CDF of a Gamma law defined by theses parameters .
ECase
Definition TTester.h:82
@ kCase1
Definition TTester.h:83
@ kCase2
Definition TTester.h:83
@ kCase0
Definition TTester.h:83
@ kCase3
Definition TTester.h:83
@ kCaseUnknown
Definition TTester.h:83
virtual void computeModifiedScore(URANIE::DataServer::TStochasticAttribute::ELawType tlaw)=0
Compute the modified value of the statistic.
Bool_t _bquiet
Boolean for being quiet.
Definition TTester.h:88
ECase _nCase
Definition TTester.h:85
Bool_t _bDrawSame
Boolean for drawing in the current pad.
Definition TTester.h:73
Double_t _dModifiedScore
The Modified value score of the last test.
Definition TTester.h:70
virtual ~TTester()
Default constructor.
Double_t getModifiedScore()
Get the modified score of the last test.
Definition TTester.h:117
Bool_t _blog
Boolean for edit the log.
Definition TTester.h:87
TGraph * createGraph(Color_t color=kBlack)
Double_t computePValue_KS_CaseAll(Double_t dz)
Compute the PValue of the test KS in all cases (Case0 && Case3)
virtual Double_t computeTheCurrentScore(Int_t i, Double_t dzi)=0
The true computation with a vector of information and return the current value.
void addBetaLaw(Double_t alpha, Double_t beta, Double_t min, Double_t max, Color_t color=kBlack, TString stitle="")
Add in the current graph the CDF of a Beta law defined by theses parameters .
void unsetLog()
Definition TTester.h:305
void addWeibullLaw(Double_t beta, Double_t m, Color_t color=kBlack, TString stitle="")
Add in the current graph the CDF of a Weibull law defined by theses parameters .
Double_t getPValue()
Get the pValue of the last test.
Definition TTester.h:122
Double_t computePValue_CvM_Case3(Double_t dz, URANIE::DataServer::TStochasticAttribute::ELawType tlaw)
Compute the PValue of the test CvM in case Case3 (all parameters of the PDF are estimated by MLE)
ETestType
Definition TTester.h:77
@ kAndersonDarling
Definition TTester.h:78
@ kUnknown
Definition TTester.h:78
@ kKolmogorovSmirnov
Definition TTester.h:78
@ kCramerVonMises
Definition TTester.h:78
void treatOption(Option_t *option)
Treats the options of the computeScore method.
Bool_t getLog()
Definition TTester.h:313
Double_t _dScore
The score of the last test.
Definition TTester.h:69
Double_t computePValue_AD_Case0(Double_t dz)
Compute the PValue of the test AD in case Case0 (all parameters of the PDF are given)
Double_t _pValue
The pValue of the last test.
Definition TTester.h:68
TList * _listOfLaws
The list of law to test.
Definition TTester.h:72
Double_t getScore()
Get the score of the last test.
Definition TTester.h:112
ETestType _nTestType
The type of test.
Definition TTester.h:80
URANIE::DataServer::TDataServer * _tds
Pointer to a TDS.
Definition TTester.h:86
Definition TCirce.cxx:58