English Français

Documentation / Developer's manual

Available modules

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

Execute the Principal Component Analysis from a TDS. More...

#include <TkPCA.h>

Inheritance diagram for URANIE::Modeler::TkPCA:
Collaboration diagram for URANIE::Modeler::TkPCA:

Public Member Functions

Constructor and Destructor
 TkPCA (URANIE::DataServer::TDataServer *tds, const char *varexp="*", Option_t *option="")
 Default constructor with TDS and attributes.
 
virtual ~TkPCA ()
 Default destructor.
 
Get and Set methods
URANIE::DataServer::TDSNtupleD * getResultNtupleD ()
 Return the NtupleD of results.
 
void setKernel (TKernel::EKernelType nKernel)
 Set the type of kernel without parameter.
 
void setKernel (TKernel::EKernelType nKernel, Double_t dparam1)
 
void setKernel (TKernel::EKernelType nKernel, Double_t dparam1, Double_t dparam2)
 Set the type of kernel with two parameters.
 
void setKernel (TKernel::EKernelType nKernel, Double_t dparam1, Double_t dparam2, Double_t dparam3)
 Set the type of kernel with three parameters.
 
Computation

Return the NtupleD of results

The TNtupleD contains :

  • an iterator (i)
  • the projection of origin variable onto PC
  • the quality of this projection through the squared cosine
  • the contribution to the definition of each and every PC
void compute (Option_t *option="")
 The compute method.
 
void generateKCenteredMatrix (Option_t *option)
 
The Draw methods
void drawkPCA (Int_t indX, Int_t indY, TString scut="", Option_t *option="")
 Draw the Component.
 
Printing Log
void setLog ()
 
void unsetLog ()
 
void changeLog ()
 
Bool_t getLog ()
 
virtual void printLog (Option_t *option="RAS")
 

Public Attributes

Bool_t _blog
 Boolean for edit the log.
 
Bool_t _CentData
 Centering Data matrix.
 
Bool_t _CentGram
 Centering Gram matrix.
 
Bool_t _bCompletedFile
 Add original data to final results (for plotting purpose)
 
URANIE::DataServer::TDataServer * _tds
 
URANIE::DataServer::TDSNtupleD * _ntdResult
 Pointer to a TDS.
 
TKernel_ker
 Kernel constructor pointer.
 
TList * _listOfInputAttributes
 The list of attributes.
 
TMatrixD _matK
 The Gram matrix.
 
TMatrixD _matKCent
 The Centered and transformed Gram Matrix.
 
int _nS
 Sample size.
 
TVectorD _vecEigenValues
 The vector of Eigenvalues.
 
TVectorD _vecPctEigenValues
 The vector of sum (in percent) of the Eigenvalues.
 

Detailed Description

Execute the Principal Component Analysis from a TDS.

The Uranie API is

TDataServer * tds = new TDataServer("tds", "my TDS");
tds->fileDataRead("jambu.dat");
TkPCA * tpca = new TkPCA(tds, "Prof:Tran:Mena:Enfa:Cour:Toil:Rep:Somm:Tele:Lois");
tpca->compute();
tpca->drawkPCA(1, 2);
tpca->drawLoading(1,2);
Execute the Principal Component Analysis from a TDS.
Definition TkPCA.h:74
void compute(Option_t *option="")
The compute method.
void drawkPCA(Int_t indX, Int_t indY, TString scut="", Option_t *option="")
Draw the Component.
See also
http://root.cern.ch/root/html/TPrincipal.html

Constructor & Destructor Documentation

◆ TkPCA()

URANIE::Modeler::TkPCA::TkPCA ( URANIE::DataServer::TDataServer *  tds,
const char *  varexp = "*",
Option_t *  option = "" 
)

Default constructor with TDS and attributes.

Parameters
tds(TDataServer *) the pointer of the TDataServer.
varexp(char*)[""] The list of attributes to analyse separated by the caracter ":" ( default "*" all attributes)
option(Option_t*) [""] option (not used actually)

Referenced by ClassImp().

◆ ~TkPCA()

virtual URANIE::Modeler::TkPCA::~TkPCA ( )
virtual

Default destructor.

Referenced by ClassImp().

Member Function Documentation

◆ changeLog()

void URANIE::Modeler::TkPCA::changeLog ( )
inline

References _blog.

◆ compute()

void URANIE::Modeler::TkPCA::compute ( Option_t *  option = "")

The compute method.

Parameters
option(Option_t*) [""] option (not used actually)

Referenced by ClassImp().

◆ drawkPCA()

void URANIE::Modeler::TkPCA::drawkPCA ( Int_t  indX,
Int_t  indY,
TString  scut = "",
Option_t *  option = "" 
)

Draw the Component.

Parameters
indX(Int_t) : the X component
indY(Int_t) : the Y component
option(Option_t*) [""] option (not used actually)

Referenced by ClassImp().

◆ generateKCenteredMatrix()

void URANIE::Modeler::TkPCA::generateKCenteredMatrix ( Option_t *  option)

Referenced by ClassImp().

◆ getLog()

Bool_t URANIE::Modeler::TkPCA::getLog ( )
inline

References _blog.

◆ getResultNtupleD()

URANIE::DataServer::TDSNtupleD * URANIE::Modeler::TkPCA::getResultNtupleD ( )
inline

Return the NtupleD of results.

The NTupleD contains :

  • an iterator (i)
  • the eigenvalue (eigen)
  • the eigenvalue in percentage (eigen_pct)
  • the cumulative eigenvalue in percentage (sum_eigen_pct)
TDataServer * tds = new TDataServer("tds", "my TDS");
tds->fileDataRead("jambu.dat");
TkPCA * tpca = new TkPCA(tds, "Prof:Tran:Mena:Enfa:Cour:Toil:Rep:Somm:Tele:Lois");
tpca->compute();
TNtupleD *ntd = tpca->getResultNtupleD();
ntd->Scan("*");
URANIE::DataServer::TDSNtupleD * getResultNtupleD()
Return the NtupleD of results.
Definition TkPCA.h:153
************************************************************
*    Row   *         i *     eigen * eigen_pct * sum_eigen *
************************************************************
*        0 *         1 * 4.5886688 * 45.886688 * 45.886688 *
*        1 *         2 * 2.1198425 * 21.198425 * 67.085114 *
*        2 *         3 * 1.3209783 * 13.209783 * 80.294897 *
*        3 *         4 * 1.1952550 * 11.952550 * 92.247448 *
*        4 *         5 * 0.4684105 * 4.6841051 * 96.931553 *
*        5 *         6 * 0.1990474 * 1.9904742 * 98.922027 *
*        6 *         7 * 0.0468131 * 0.4681319 * 99.390159 *
*        7 *         8 * 0.0370651 * 0.3706510 * 99.760810 *
*        8 *         9 * 0.0239189 * 0.2391893 *       100 *
*        9 *        10 * 2.720e-16 * 2.720e-15 *       100 *
************************************************************

References _ntdResult.

◆ printLog()

virtual void URANIE::Modeler::TkPCA::printLog ( Option_t *  option = "RAS")
virtual

Referenced by ClassImp().

◆ setKernel() [1/4]

void URANIE::Modeler::TkPCA::setKernel ( TKernel::EKernelType  nKernel)
inline

Set the type of kernel without parameter.

Parameters
nKernel(EKernelType) The type of kernel

References _ker, and URANIE::Modeler::TKernel::setKernel().

◆ setKernel() [2/4]

void URANIE::Modeler::TkPCA::setKernel ( TKernel::EKernelType  nKernel,
Double_t  dparam1 
)
inline
Parameters
nKernel(EKernelType) The type of kernel
dparam(Double_t) the First and only one parameter

References _ker, and URANIE::Modeler::TKernel::setKernel().

◆ setKernel() [3/4]

void URANIE::Modeler::TkPCA::setKernel ( TKernel::EKernelType  nKernel,
Double_t  dparam1,
Double_t  dparam2 
)
inline

Set the type of kernel with two parameters.

Parameters
nKernel(EKernelType) The type of kernel
dparam1(Double_t) First parameter
dparam2(Double_t) Second parameter

References _ker, and URANIE::Modeler::TKernel::setKernel().

◆ setKernel() [4/4]

void URANIE::Modeler::TkPCA::setKernel ( TKernel::EKernelType  nKernel,
Double_t  dparam1,
Double_t  dparam2,
Double_t  dparam3 
)
inline

Set the type of kernel with three parameters.

Parameters
nKernel(EKernelType) The type of kernel
dparam1(Double_t) First parameter
dparam2(Double_t) Second parameter
dparam3(Double_t) Third parameter

References _ker, and URANIE::Modeler::TKernel::setKernel().

◆ setLog()

void URANIE::Modeler::TkPCA::setLog ( )
inline

References _blog.

◆ unsetLog()

void URANIE::Modeler::TkPCA::unsetLog ( )
inline

References _blog.

Member Data Documentation

◆ _bCompletedFile

Bool_t URANIE::Modeler::TkPCA::_bCompletedFile

Add original data to final results (for plotting purpose)

Referenced by ClassImp().

◆ _blog

Bool_t URANIE::Modeler::TkPCA::_blog

Boolean for edit the log.

Referenced by changeLog(), ClassImp(), getLog(), setLog(), and unsetLog().

◆ _CentData

Bool_t URANIE::Modeler::TkPCA::_CentData

Centering Data matrix.

◆ _CentGram

Bool_t URANIE::Modeler::TkPCA::_CentGram

Centering Gram matrix.

Referenced by ClassImp().

◆ _ker

TKernel* URANIE::Modeler::TkPCA::_ker

Kernel constructor pointer.

Referenced by ClassImp(), setKernel(), setKernel(), setKernel(), and setKernel().

◆ _listOfInputAttributes

TList* URANIE::Modeler::TkPCA::_listOfInputAttributes

The list of attributes.

Referenced by ClassImp().

◆ _matK

TMatrixD URANIE::Modeler::TkPCA::_matK

The Gram matrix.

Referenced by ClassImp().

◆ _matKCent

TMatrixD URANIE::Modeler::TkPCA::_matKCent

The Centered and transformed Gram Matrix.

Referenced by ClassImp().

◆ _nS

int URANIE::Modeler::TkPCA::_nS

Sample size.

Referenced by ClassImp().

◆ _ntdResult

URANIE::DataServer::TDSNtupleD* URANIE::Modeler::TkPCA::_ntdResult

Pointer to a TDS.

The NTupleD of results (for variable interpretation)

Referenced by ClassImp(), and getResultNtupleD().

◆ _tds

URANIE::DataServer::TDataServer* URANIE::Modeler::TkPCA::_tds

Referenced by ClassImp().

◆ _vecEigenValues

TVectorD URANIE::Modeler::TkPCA::_vecEigenValues

The vector of Eigenvalues.

Referenced by ClassImp().

◆ _vecPctEigenValues

TVectorD URANIE::Modeler::TkPCA::_vecPctEigenValues

The vector of sum (in percent) of the Eigenvalues.

Referenced by ClassImp().