English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Sensitivity: TShapley.h Source File
Uranie / Sensitivity  v4.10.0
/* @license-end */
TShapley.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/>.
17 
44 #ifndef TSHAPLEY_H
45 #define TSHAPLEY_H
46 
48 
50 #include "TSensitivity.h"
51 #include "TGaussianSampling.h"
52 
53 using namespace URANIE::DataServer;
54 using namespace URANIE::Sampler;
55 
56 namespace URANIE
57 {
58 namespace Sensitivity
59 {
60 class TShapley: public TSensitivity
61 {
62 public:
64  {
68  kUnknown
69  };
70  //---------------------------------------------
77  TShapley();
78 
79  TShapley(TDataServer *tds, const char *varexpinput,
80  const char *varexpoutput, Option_t * option = "");
81 
91  TShapley(TDataServer *tds, const char *fcn, Int_t ns,
92  const char *varexpinput, const char *varexpoutput,
93  Option_t* option="");
94 
103  TShapley(TDataServer *tds, void (*fcn)(Double_t*,Double_t*),
104  Int_t ns, const char *varexpinput, const char *varexpoutput,
105  Option_t* option="");
106 
114  TShapley(TDataServer *tds, URANIE::Launcher::TCode *fcode,
115  Int_t ns, Option_t * option = "");
116 
124  TShapley(TDataServer *tds, URANIE::Relauncher::TRun *run,
125  Int_t ns, Option_t * option = "");
126 
127 
131  virtual ~TShapley();
133  //---------------------------------------------
137  const char * getIteratorNameNo()
138  {
139  return _sIteratorNameNo.Data();
140  }
141  const char * getIteratorNameNi()
142  {
143  return _sIteratorNameNi.Data();
144  }
145  Int_t getNv() { return _nV;}
146  void setNv(Int_t nv);
147 
148  Int_t getNm() { return _nM;}
149  void setNm(Int_t nm);
150 
151  Int_t getNo() { return _nO;}
152  void setNo(Int_t no);
153 
154  Int_t getNi() { return _nI;}
155  void setNi(Int_t ni);
156 
157 
158  void setSamplerMethod(EConditionalSampling nMethod);
159 
161  return _nCondSampler;
162  }
163 
165  return _matNormalCovariance;
166  }
167 
168 
170 
171  //---------------------------------------------
175  virtual void generateSample(Option_t * option = "");
177 
178 
179  //---------------------------------------------
183 
188  void evaluateIndexes(Option_t * option = "");
190 
191 
192 
193  void printLog(Option_t *option = "");
194 
202  void printSummary(Option_t * option = "");
204 
205 
206 private:
207  // methods
208  void transfertDataTDS(TDataServer *tds);
209  void splitMatrixVarCoVar(TMatrixD matVarCovar, TVectorD vecOfUnit,
210  TMatrixD &matVarCovar0, TMatrixD &matVarCovar1, TMatrixD &matVarCovar01,
211  TMatrixD matCorr, TMatrixD &matCorrtmp);
222  void computeNormalCorrelationMatrix(TMatrixD matVarCovariance);
223 
234  TDataServer *generateConditionnalSampleByNortaOriginal(TDataServer *tds0, TDataServer *tds1, TMatrixD matVarCovar0, TMatrixD matVarCovar1, TMatrixD matVarCovar01);
235  void generateConditionnalSampleByNorta(TGaussianSampling *tsanormal, TDataServer *tdsres, TList *listOfLeaves, TMatrixD matVarCovar, TVectorD &vecOf01);
236 
237 
238  // Attributes
241  Int_t _nV;
242  Int_t _nO;
243  Int_t _nI;
244  Int_t _nM;
247 protected:
248  void init(Option_t* option);
249 public:
250  ClassDef(TShapley, ID_SENSITIVITY)
251 };
252 } // End Of namespace Sensitivity
253 } // End Of namespace URANIE
254 
255 #endif
256 // End Of File
ROOT.
Definition: TCMN.h:45
Int_t _nI
The size of the nI sample.
Definition: TShapley.h:243
EConditionalSampling getSamplerMethod()
Definition: TShapley.h:160
TMatrixD getMatrixNormalVariance()
Definition: TShapley.h:164
Description of the class TShapley.
Definition: TShapley.h:60
Definition: TShapley.h:65
const char * getIteratorNameNo()
Definition: TShapley.h:137
Definition: TShapley.h:67
Int_t getNo()
Definition: TShapley.h:151
const char * getIteratorNameNi()
Definition: TShapley.h:141
Int_t getNv()
Definition: TShapley.h:145
EConditionalSampling _nCondSampler
The method of sampler.
Definition: TShapley.h:246
Int_t _nV
The size of the nV sample.
Definition: TShapley.h:241
TString _sIteratorNameNi
The specific iterator attribute for NI integer.
Definition: TShapley.h:240
Description of the class TSensitivity.
Definition: TSensitivity.h:111
EConditionalSampling
Definition: TShapley.h:63
TString _sIteratorNameNo
The specific iterator attribute for NO integer.
Definition: TShapley.h:239
Int_t getNi()
Definition: TShapley.h:154
Int_t _nO
The size of the nO sample.
Definition: TShapley.h:242
TMatrixD _matNormalCovariance
Normal(Gaussian) Input Covariance matrix.
Definition: TShapley.h:245
Int_t _nM
The size of the loop of permutations.
Definition: TShapley.h:244
Interface of class URANIE::Sensitivity::TSensitivity.
Int_t getNm()
Definition: TShapley.h:148