English Français

Documentation / Developer's manual

Available modules

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

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

#include <TPCA.h>

Inheritance diagram for URANIE::DataServer::TPCA:
Collaboration diagram for URANIE::DataServer::TPCA:

Public Member Functions

Constructor and Destructor
 TPCA (URANIE::DataServer::TDataServer *tds, const char *varexp="*", Option_t *option="")
 Default constructor with TDS and attributes.
 
virtual ~TPCA ()
 Default destructor.
 
Get and Set methods
TNtupleD * getResultNtupleD ()
 Return the NtupleD of results.
 
TDSNtupleDgetVariableResultNtupleD ()
 Return the NtupleD of results.
 
Computation
void compute (Option_t *option="")
 The compute method.
 
The Draw methods
void drawPCA (Int_t indX, Int_t indY, Option_t *option="")
 Draw the Component.
 
void drawLoading (Int_t indX, Int_t indY, Option_t *option="")
 Draw the Loading.
 
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.
 
URANIE::DataServer::TDataServer_tds
 
TNtupleD * _ntdResult
 Pointer to a TDS.
 
TDSNtupleD_ntdVarResult
 The NTupleD of results (for variable interpretation)
 
TNtupleD * _ntdLoading
 The NTupleD of Loading.
 
TList * _listOfInputAttributes
 The list of attributes.
 
TMatrixD _matCorr
 The matrix of Correlation.
 
TVectorD _vecEigenValues
 The vector of Eigenvalues.
 
TVectorD _vecSumPctEigenValues
 The vector of sum (in percent) of the Eigenvalues.
 
TMatrixD _matEigenVectors
 The matrix of Eigenvectors.
 

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");
TPCA * tpca = new TPCA(tds, "Prof:Tran:Mena:Enfa:Cour:Toil:Rep:Somm:Tele:Lois");
tpca->compute();
tpca->drawPCA(1, 2);
tpca->drawLoading(1,2);
Description of the class TDataServer.
Definition TDataServer.h:86
Bool_t fileDataRead(const char *name, Bool_t bSave=kTRUE, Bool_t bDontAddAttribute=kFALSE, Option_t *option="")
Reads a ASCII file with a header.
Execute the Principal Component Analysis from a TDS.
Definition TPCA.h:72
void drawLoading(Int_t indX, Int_t indY, Option_t *option="")
Draw the Loading.
void compute(Option_t *option="")
The compute method.
void drawPCA(Int_t indX, Int_t indY, Option_t *option="")
Draw the Component.
See also
http://root.cern.ch/root/html/TPrincipal.html

Constructor & Destructor Documentation

◆ TPCA()

URANIE::DataServer::TPCA::TPCA ( 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().

◆ ~TPCA()

virtual URANIE::DataServer::TPCA::~TPCA ( )
virtual

Default destructor.

Referenced by ClassImp().

Member Function Documentation

◆ changeLog()

void URANIE::DataServer::TPCA::changeLog ( )
inline

References _blog.

◆ compute()

void URANIE::DataServer::TPCA::compute ( Option_t *  option = "")

The compute method.

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

Referenced by ClassImp().

◆ drawLoading()

void URANIE::DataServer::TPCA::drawLoading ( Int_t  indX,
Int_t  indY,
Option_t *  option = "" 
)

Draw the Loading.

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

Referenced by ClassImp().

◆ drawPCA()

void URANIE::DataServer::TPCA::drawPCA ( Int_t  indX,
Int_t  indY,
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().

◆ getLog()

Bool_t URANIE::DataServer::TPCA::getLog ( )
inline

References _blog.

◆ getResultNtupleD()

TNtupleD * URANIE::DataServer::TPCA::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");
TPCA * tpca = new TPCA(tds, "Prof:Tran:Mena:Enfa:Cour:Toil:Rep:Somm:Tele:Lois");
tpca->compute();
TNtupleD *ntd = tpca->getResultNtupleD();
ntd->Scan("*");
TNtupleD * getResultNtupleD()
Return the NtupleD of results.
Definition TPCA.h:145
************************************************************
*    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.

◆ getVariableResultNtupleD()

TDSNtupleD * URANIE::DataServer::TPCA::getVariableResultNtupleD ( )
inline

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

References _ntdVarResult.

◆ printLog()

virtual void URANIE::DataServer::TPCA::printLog ( Option_t *  option = "RAS")
virtual

Referenced by ClassImp().

◆ setLog()

void URANIE::DataServer::TPCA::setLog ( )
inline

References _blog.

◆ unsetLog()

void URANIE::DataServer::TPCA::unsetLog ( )
inline

References _blog.

Member Data Documentation

◆ _blog

Bool_t URANIE::DataServer::TPCA::_blog

Boolean for edit the log.

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

◆ _listOfInputAttributes

TList* URANIE::DataServer::TPCA::_listOfInputAttributes

The list of attributes.

Referenced by ClassImp().

◆ _matCorr

TMatrixD URANIE::DataServer::TPCA::_matCorr

The matrix of Correlation.

Referenced by ClassImp().

◆ _matEigenVectors

TMatrixD URANIE::DataServer::TPCA::_matEigenVectors

The matrix of Eigenvectors.

Referenced by ClassImp().

◆ _ntdLoading

TNtupleD* URANIE::DataServer::TPCA::_ntdLoading

The NTupleD of Loading.

Referenced by ClassImp().

◆ _ntdResult

TNtupleD* URANIE::DataServer::TPCA::_ntdResult

Pointer to a TDS.

The NTupleD of results (eigen values)

Referenced by ClassImp(), and getResultNtupleD().

◆ _ntdVarResult

TDSNtupleD* URANIE::DataServer::TPCA::_ntdVarResult

The NTupleD of results (for variable interpretation)

Referenced by ClassImp(), and getVariableResultNtupleD().

◆ _tds

URANIE::DataServer::TDataServer* URANIE::DataServer::TPCA::_tds

Referenced by ClassImp().

◆ _vecEigenValues

TVectorD URANIE::DataServer::TPCA::_vecEigenValues

The vector of Eigenvalues.

Referenced by ClassImp().

◆ _vecSumPctEigenValues

TVectorD URANIE::DataServer::TPCA::_vecSumPctEigenValues

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

Referenced by ClassImp().