English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Sensitivity: URANIE::Sensitivity::TShapley Class Reference
Uranie / Sensitivity v4.9.0
/* @license-end */
URANIE::Sensitivity::TShapley Class Reference

Description of the class TShapley. More...

#include <TShapley.h>

Inheritance diagram for URANIE::Sensitivity::TShapley:
Collaboration diagram for URANIE::Sensitivity::TShapley:

Public Types

enum  EConditionalSampling { kNorta , kCopulas , kVines , kUnknown }
 
- Public Types inherited from URANIE::Sensitivity::TSensitivity
enum  ELauncher {
  kCode , kCodeRemote , kFunction , kRun ,
  kUnknown
}
 

Public Member Functions

Constructor and Destructor
 TShapley ()
 Default constructor.
 
 TShapley (TDataServer *tds, const char *varexpinput, const char *varexpoutput, Option_t *option="")
 
 TShapley (TDataServer *tds, const char *fcn, Int_t ns, const char *varexpinput, const char *varexpoutput, Option_t *option="")
 Constructor with the TDataServer and function name.
 
 TShapley (TDataServer *tds, void(*fcn)(Double_t *, Double_t *), Int_t ns, const char *varexpinput, const char *varexpoutput, Option_t *option="")
 Constructor with the TDataServer and function.
 
 TShapley (TDataServer *tds, URANIE::Launcher::TCode *fcode, Int_t ns, Option_t *option="")
 Constructor with the TDataServer and a TCode.
 
 TShapley (TDataServer *tds, URANIE::Relauncher::TRun *run, Int_t ns, Option_t *option="")
 Constructor with the TDataServer and a TRun.
 
virtual ~TShapley ()
 Default destructor.
 
Setting and Getting attributs
const char * getIteratorNameNo ()
 
const char * getIteratorNameNi ()
 
Int_t getNv ()
 
void setNv (Int_t nv)
 
Int_t getNm ()
 
void setNm (Int_t nm)
 
Int_t getNo ()
 
void setNo (Int_t no)
 
Int_t getNi ()
 
void setNi (Int_t ni)
 
void setSamplerMethod (EConditionalSampling nMethod)
 
EConditionalSampling getSamplerMethod ()
 
TMatrixD getMatrixNormalVariance ()
 
Generation of the sample
virtual void generateSample (Option_t *option="")
 
- Public Member Functions inherited from URANIE::Sensitivity::TSensitivity
 TSensitivity ()
 Default constructor.
 
 TSensitivity (URANIE::DataServer::TDataServer *tds, const char *fcn, Int_t ns, const char *varexpinput="", const char *varexpoutput="", Option_t *option="")
 Default constructor with the name of a function.
 
 TSensitivity (URANIE::DataServer::TDataServer *tds, void(*fcn)(Double_t *, Double_t *), const char *varexpinput, const char *varexpoutput, Int_t ns, Option_t *option="")
 
 TSensitivity (URANIE::DataServer::TDataServer *tds, const char *varexpinput, const char *varexpoutput, Option_t *option="")
 Default constructor.
 
 TSensitivity (URANIE::DataServer::TDataServer *tds, URANIE::Launcher::TCode *code, Int_t ns, Option_t *option="")
 Default constructor with TCode arg.
 
 TSensitivity (URANIE::DataServer::TDataServer *tds, URANIE::Relauncher::TRun *run, Int_t ns, Option_t *option="")
 Default constructor with TRun arg.
 
virtual ~TSensitivity ()
 Default destructor.
 
Int_t getID ()
 
virtual TTree * getResultTuple (bool commonresulttuple=true)
 Get the result ntuple (default parameter unused but for Morris method)
 
double getValue (const char *sorder="", const char *sinputname="", const char *sselect="")
 
vector< int > * getAttributeElements (string str)
 
void setFunction (void(*fct)(Double_t *, Double_t *), Int_t nx=-1, Int_t ny=1)
 
TString getFunctionName ()
 
void setSeed (UInt_t nval)
 
UInt_t getSeed ()
 
virtual void setMethodName (const char *str)
 Set the Method name.
 
const char * getMethodName ()
 Get the method name.
 
Bool_t getNoIntermediateSaved ()
 Get the noIntermediateSaved flag.
 
const char * getIteratorName ()
 Get the name of the iterator attribut of the method.
 
void setSensitivityIteratorName (const char *str)
 Set the iterator name devoted to compute sensitivity indexes.
 
void setTimeName (TString sname)
 Set the name of the time attribute (only one)
 
TString getTimeName ()
 Get the name of the time attribute.
 
virtual void setDrawProgressBar (Bool_t bbool=kTRUE)
 Set the "draw progress bar" flag.
 
void setUsingErrors (bool thebool)
 Set the "using error results anyway" option.
 
Bool_t getDrawProgressBar ()
 Get the clean flag.
 
Bool_t isInputCorrelated ()
 
TMatrixD getMatrixInputCorrelation ()
 
Int_t getNInput ()
 Get the number of input attributes.
 
Int_t getNOutput ()
 Get the number of output attributes.
 
void setInputCorrelationMatrix (TMatrixD Corr)
 
virtual void parseOption (Option_t *option="")
 Read the possible options.
 
void checkOutputRequested (string attlist, bool fromoption=false)
 Check the output list requested by the user.
 
void computeIndexes (Option_t *option="")
 Compute the Sensitivity Indexes.
 
void fillIndex (const char *sinputname, const char *sorder, Double_t dval, const char *algo="", Double_t dvalCILower=-1.0, Double_t dvalCIUpper=-1.0)
 Method to fill in the tree the value of Sensitivity indexes for an input attribute.
 
virtual void createTuple (Option_t *option="")
 
virtual void drawIndexes (TString sTitre, const char *select="", Option_t *option="")
 Draws the indexes.
 
virtual void setLog ()
 
void unsetLog ()
 
void changeLog ()
 
Bool_t getLog ()
 
void setNLauncher (ELauncher codeLauncher)
 

Compute the indexes

TString _sIteratorNameNo
 The specific iterator attribute for NO integer.
 
TString _sIteratorNameNi
 The specific iterator attribute for NI integer.
 
Int_t _nV
 The size of the nV sample.
 
Int_t _nO
 The size of the nO sample.
 
Int_t _nI
 The size of the nI sample.
 
Int_t _nM
 The size of the loop of permutations.
 
TMatrixD _matNormalCovariance
 Normal(Gaussian) Input Covariance matrix.
 
EConditionalSampling _nCondSampler
 The method of sampler.
 
void evaluateIndexes (Option_t *option="")
 Compute the sensitivity matrix.
 
void printLog (Option_t *option="")
 
void printSummary (Option_t *option="")
 Print the summary of the TShapley method.
 
void transfertDataTDS (TDataServer *tds)
 
void splitMatrixVarCoVar (TMatrixD matVarCovar, TVectorD vecOfUnit, TMatrixD &matVarCovar0, TMatrixD &matVarCovar1, TMatrixD &matVarCovar01, TMatrixD matCorr, TMatrixD &matCorrtmp)
 
void computeNormalCorrelationMatrix (TMatrixD matVarCovariance)
 computeNormalCorrelationMatrix
 
TDataServer * generateConditionnalSampleByNortaOriginal (TDataServer *tds0, TDataServer *tds1, TMatrixD matVarCovar0, TMatrixD matVarCovar1, TMatrixD matVarCovar01)
 generateConditionnalSample
 
void generateConditionnalSampleByNorta (TGaussianSampling *tsanormal, TDataServer *tdsres, TList *listOfLeaves, TMatrixD matVarCovar, TVectorD &vecOf01)
 
void init (Option_t *option)
 

Additional Inherited Members

- Public Attributes inherited from URANIE::Sensitivity::TSensitivity
URANIE::DataServer::TDataServer * _tds
 Pointeur vers un TDS.
 
TList * _listOfInputAttributes
 List of the input branches.
 
TList * _listOfOutputAttributes
 List of the input branches.
 
TString _sTimeAttribute
 The name of the Time attribute.
 
Int_t _nS
 The number of simulation or other information depend on the used method.
 
Int_t _nX
 Dimension of the input.
 
UInt_t _nY
 Dimension of the target.
 
UInt_t _nElY
 Number of element for one selected output.
 
Int_t _nbOut
 Total number of Output to be considered.
 
Int_t _iOut
 counter for output
 
unsigned int _iy
 iterator over number of element
 
unsigned int _iely
 iterator over number of element
 
ELauncher _nLauncher
 The type of launcher.
 
TString _sFunctionName
 The Name of the evaluatuor.
 
URANIE::Launcher::TCode * _code
 The tcode.
 
URANIE::Relauncher::TRun * _run
 
TObjArray * _drawingGarbageCollector
 Garbage collector for prints.
 
Int_t _nSeed
 The seed of the random generator.
 
Bool_t _bChosenOutputs
 Fact that the input list is provided or not.
 
Bool_t _blog
 Boolean for edit the log.
 
Bool_t _bdrawProgressBar
 Boolean to know if the progress bar has to be drawn.
 
Bool_t _bnoIntermediateSaved
 Boolean to know if the progress bar has to be drawn.
 
TString _sIteratorName
 The specific iterator attribute for the method.
 
TString _sMethodName
 The method name.
 
TString _sSelectedOutput
 The output.
 
TString _sSelectedInput
 The input.
 
map< string, unsigned int > _mAttributeSize
 Map of size of element for attribute;.
 
map< string, vector< int > > _mAttributeElements
 Map of Elements number to run (if vector subselection is requested)
 
vector< string > _vOutputNames
 Name of the output.
 
TCanvas * _canvas
 Canvas object to deal with.
 
void(* _pFunction )(double *, double *)
 
TTree * _ntresult
 The TTree of results.
 
- Protected Member Functions inherited from URANIE::Sensitivity::TSensitivity
void checkCanvasCreation (bool newcan)
 Create a canvas if needed.
 
void drawIndexesHistogram (TString sTitre, const char *select="", Option_t *option="")
 Draws indexes with an histogram.
 
void drawIndexesPie (TString sTitre, const char *select="", Option_t *option="")
 Draws indexes with an pie chart.
 
virtual void preTreatment ()
 PreTreatment for every output.
 
virtual void postTreatment ()
 PostTreatment for every output.
 
void setNoIntermediateSaved (Bool_t bbool=kTRUE)
 Set the "only final file" flag.
 
- Protected Attributes inherited from URANIE::Sensitivity::TSensitivity
Char_t _sOutputAttribute [MAXLENGTHSTRING]
 The name of the output attribute.
 
Char_t _sInputAttribute [MAXLENGTHSTRING]
 The name of the input attribute.
 
Char_t _sOrder [MAXLENGTHSTRING]
 The order of sensitivity indexes.
 
Char_t _sMethod [MAXLENGTHSTRING]
 The name of the method.
 
Char_t _sAlgorithm [MAXLENGTHSTRING]
 The name of the algorithm to compute the index.
 
Double_t _valSobolCrt
 The value of sensitivity indexes.
 
Double_t _valSobolCILower
 The value of lower Condidence Interval (95)
 
Double_t _valSobolCIUpper
 The value of upper Condidence Interval (95)
 
TMatrixD _minputCorr
 Input correlation matrix if sample needs to be correlated.
 
Bool_t _bisInputCorrelated
 State whether the input correlation matrix is set.
 
Bool_t _bgoingThroughError
 State whether the error must not block the computation.
 

Detailed Description

Description of the class TShapley.

Description of the class THSIC.

Introduction

Bibliography

  • Shapley 1953
  • Owen 2014 "Sobol' indices and Shapley value", Journal of Uncertainty Quantification, 2:245-251
  • Owen, Prieur, 2017, "On Shapley value for measuring importance of dependent inputs",
  • Iooss, Prieur, 2017, "Shapley effects for Sensitivity Analysis with dependent inputs: comparaison with Sobol' indices, numerical estimation and applications"
  • Song, Nelson, Staum, 2016 "Shapley Effect for Global Sensitivity Analysis: Theory and Computation"

Member Enumeration Documentation

◆ EConditionalSampling

Enumerator
kNorta 
kCopulas 
kVines 
kUnknown 

Constructor & Destructor Documentation

◆ TShapley() [1/6]

URANIE::Sensitivity::TShapley::TShapley ( )

Default constructor.

Referenced by ClassImp().

◆ TShapley() [2/6]

URANIE::Sensitivity::TShapley::TShapley ( TDataServer *  tds,
const char *  varexpinput,
const char *  varexpoutput,
Option_t *  option = "" 
)

◆ TShapley() [3/6]

URANIE::Sensitivity::TShapley::TShapley ( TDataServer *  tds,
const char *  fcn,
Int_t  ns,
const char *  varexpinput,
const char *  varexpoutput,
Option_t *  option = "" 
)

Constructor with the TDataServer and function name.

Parameters
tds
fcn
ns
varexpinput
varexpoutput
option[""]

◆ TShapley() [4/6]

URANIE::Sensitivity::TShapley::TShapley ( TDataServer *  tds,
void(*)(Double_t *, Double_t *)  fcn,
Int_t  ns,
const char *  varexpinput,
const char *  varexpoutput,
Option_t *  option = "" 
)

Constructor with the TDataServer and function.

Parameters
tds
ns
sInputs
sOutputs
option

◆ TShapley() [5/6]

URANIE::Sensitivity::TShapley::TShapley ( TDataServer *  tds,
URANIE::Launcher::TCode *  fcode,
Int_t  ns,
Option_t *  option = "" 
)

Constructor with the TDataServer and a TCode.

Parameters
tds
fcode
ns
option

◆ TShapley() [6/6]

URANIE::Sensitivity::TShapley::TShapley ( TDataServer *  tds,
URANIE::Relauncher::TRun *  run,
Int_t  ns,
Option_t *  option = "" 
)

Constructor with the TDataServer and a TRun.

Parameters
tds
run
ns
option

◆ ~TShapley()

virtual URANIE::Sensitivity::TShapley::~TShapley ( )
virtual

Default destructor.

Referenced by ClassImp().

Member Function Documentation

◆ computeNormalCorrelationMatrix()

void URANIE::Sensitivity::TShapley::computeNormalCorrelationMatrix ( TMatrixD  matVarCovariance)
private

computeNormalCorrelationMatrix

Compute the correlation matrix \bf "_matNormalCorr " from the rank correlation for the Normal (Gaussian) multivariate distribution

$f[ \rho \: = \: 2 \: sin ( \frac{\pi}{6} \rh_{r} $f]

Referenced by ClassImp().

◆ evaluateIndexes()

void URANIE::Sensitivity::TShapley::evaluateIndexes ( Option_t *  option = "")
virtual

Compute the sensitivity matrix.

Parameters
option

Implements URANIE::Sensitivity::TSensitivity.

Referenced by ClassImp().

◆ generateConditionnalSampleByNorta()

void URANIE::Sensitivity::TShapley::generateConditionnalSampleByNorta ( TGaussianSampling *  tsanormal,
TDataServer *  tdsres,
TList *  listOfLeaves,
TMatrixD  matVarCovar,
TVectorD &  vecOf01 
)
private

Referenced by ClassImp().

◆ generateConditionnalSampleByNortaOriginal()

TDataServer * URANIE::Sensitivity::TShapley::generateConditionnalSampleByNortaOriginal ( TDataServer *  tds0,
TDataServer *  tds1,
TMatrixD  matVarCovar0,
TMatrixD  matVarCovar1,
TMatrixD  matVarCovar01 
)
private

generateConditionnalSample

Generate a conditionnal sample from tds

Parameters
tds
matVarCovar0
matVarCovar1
matVarCovar01

Referenced by ClassImp().

◆ generateSample()

virtual void URANIE::Sensitivity::TShapley::generateSample ( Option_t *  option = "")
virtual

Implements URANIE::Sensitivity::TSensitivity.

Referenced by ClassImp().

◆ getIteratorNameNi()

const char * URANIE::Sensitivity::TShapley::getIteratorNameNi ( )
inline

References _sIteratorNameNi.

◆ getIteratorNameNo()

const char * URANIE::Sensitivity::TShapley::getIteratorNameNo ( )
inline

References _sIteratorNameNo.

◆ getMatrixNormalVariance()

TMatrixD URANIE::Sensitivity::TShapley::getMatrixNormalVariance ( )
inline

References _matNormalCovariance.

◆ getNi()

Int_t URANIE::Sensitivity::TShapley::getNi ( )
inline

References _nI.

◆ getNm()

Int_t URANIE::Sensitivity::TShapley::getNm ( )
inline

References _nM.

◆ getNo()

Int_t URANIE::Sensitivity::TShapley::getNo ( )
inline

References _nO.

◆ getNv()

Int_t URANIE::Sensitivity::TShapley::getNv ( )
inline

References _nV.

◆ getSamplerMethod()

EConditionalSampling URANIE::Sensitivity::TShapley::getSamplerMethod ( )
inline

References _nCondSampler.

◆ init()

void URANIE::Sensitivity::TShapley::init ( Option_t *  option)
protected

Referenced by ClassImp().

◆ printLog()

void URANIE::Sensitivity::TShapley::printLog ( Option_t *  option = "")
virtual

Reimplemented from URANIE::Sensitivity::TSensitivity.

Referenced by ClassImp().

◆ printSummary()

void URANIE::Sensitivity::TShapley::printSummary ( Option_t *  option = "")

Print the summary of the TShapley method.

Print just the results of the method NOT THE LOG Just a test to generalize

Parameters
option(Option_t *) option to pass [""]

Referenced by ClassImp().

◆ setNi()

void URANIE::Sensitivity::TShapley::setNi ( Int_t  ni)

Referenced by ClassImp().

◆ setNm()

void URANIE::Sensitivity::TShapley::setNm ( Int_t  nm)

Referenced by ClassImp().

◆ setNo()

void URANIE::Sensitivity::TShapley::setNo ( Int_t  no)

Referenced by ClassImp().

◆ setNv()

void URANIE::Sensitivity::TShapley::setNv ( Int_t  nv)

Referenced by ClassImp().

◆ setSamplerMethod()

void URANIE::Sensitivity::TShapley::setSamplerMethod ( EConditionalSampling  nMethod)

Referenced by ClassImp().

◆ splitMatrixVarCoVar()

void URANIE::Sensitivity::TShapley::splitMatrixVarCoVar ( TMatrixD  matVarCovar,
TVectorD  vecOfUnit,
TMatrixD &  matVarCovar0,
TMatrixD &  matVarCovar1,
TMatrixD &  matVarCovar01,
TMatrixD  matCorr,
TMatrixD &  matCorrtmp 
)
private

Referenced by ClassImp().

◆ transfertDataTDS()

void URANIE::Sensitivity::TShapley::transfertDataTDS ( TDataServer *  tds)
private

Referenced by ClassImp().

Member Data Documentation

◆ _matNormalCovariance

TMatrixD URANIE::Sensitivity::TShapley::_matNormalCovariance
private

Normal(Gaussian) Input Covariance matrix.

Referenced by ClassImp(), and getMatrixNormalVariance().

◆ _nCondSampler

EConditionalSampling URANIE::Sensitivity::TShapley::_nCondSampler
private

The method of sampler.

Referenced by ClassImp(), and getSamplerMethod().

◆ _nI

Int_t URANIE::Sensitivity::TShapley::_nI
private

The size of the nI sample.

Referenced by ClassImp(), and getNi().

◆ _nM

Int_t URANIE::Sensitivity::TShapley::_nM
private

The size of the loop of permutations.

Referenced by ClassImp(), and getNm().

◆ _nO

Int_t URANIE::Sensitivity::TShapley::_nO
private

The size of the nO sample.

Referenced by ClassImp(), and getNo().

◆ _nV

Int_t URANIE::Sensitivity::TShapley::_nV
private

The size of the nV sample.

Referenced by ClassImp(), and getNv().

◆ _sIteratorNameNi

TString URANIE::Sensitivity::TShapley::_sIteratorNameNi
private

The specific iterator attribute for NI integer.

Referenced by ClassImp(), and getIteratorNameNi().

◆ _sIteratorNameNo

TString URANIE::Sensitivity::TShapley::_sIteratorNameNo
private

The specific iterator attribute for NO integer.

Referenced by ClassImp(), and getIteratorNameNo().