English Français

Documentation / Manuel développeur

Modules disponibles

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / Modeler: TkPCA.h Source File
Uranie / Modeler v4.9.0
/* @license-end */
TkPCA.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
55#ifndef TkPCA_H
56#define TkPCA_H
57//ROOT
58#include "Rtypes.h"
59#include "TNamed.h"
60#include "TMatrixTBase.h"
61#include "TVectorT.h"
62
63//URANIE
64#include "Modeler.h"
65#include "TDataServer.h"
66#include "TDSNtupleD.h"
67#include "TKernel.h"
68
69namespace URANIE
70{
71namespace Modeler
72{
73class TkPCA: public TNamed
74{
75public:
76 Bool_t _blog;
77 Bool_t _CentData;
78 Bool_t _CentGram;
80 URANIE::DataServer::TDataServer *_tds;
81 URANIE::DataServer::TDSNtupleD * _ntdResult;
83 // TNtupleD * _ntdLoading; ///< The NTupleD of Loading
84 // TNtupleD * _ntdLoadingCircle; ///< The NTupleD of Loading for the circle
86
87 TMatrixD _matK;
88 TMatrixD _matKCent;
89 int _nS;
90 TVectorD _vecEigenValues;
92 // TMatrixD _matEigenVectors; ///< The matrix of Eigenvectors
93
94public:
95 //---------------------------------------------
99
106 TkPCA(URANIE::DataServer::TDataServer *tds, const char *varexp = "*",
107 Option_t * option = "");
108
110 virtual ~TkPCA();
112
113 //---------------------------------------------
117
153 URANIE::DataServer::TDSNtupleD* getResultNtupleD(){
154 return _ntdResult;
155 }
156
158
162 _ker->setKernel(nKernel);
163 }
168 void setKernel(TKernel::EKernelType nKernel, Double_t dparam1){
169 _ker->setKernel(nKernel, dparam1);
170 }
172
177 void setKernel(TKernel::EKernelType nKernel, Double_t dparam1, Double_t dparam2){
178 _ker->setKernel(nKernel, dparam1, dparam2);
179 }
181
187 void setKernel(TKernel::EKernelType nKernel, Double_t dparam1, Double_t dparam2, Double_t dparam3){
188 _ker->setKernel(nKernel, dparam1, dparam2, dparam3);
189 }
190
192
199 // TDSNtupleD* getVariableResultNtupleD()
200 // {
201 // return _ntdVarResult;
202 // }
204
205 //---------------------------------------------
209
213 void compute(Option_t* option = "");
214
215 void generateKCenteredMatrix(Option_t * option);
216
218
219 //---------------------------------------------
223
229 void drawkPCA(Int_t indX, Int_t indY, TString scut="", Option_t* option = "");
231
232 //---------------------------------------------
236 void setLog()
237 {
238 _blog = kTRUE;
239 }
240 void unsetLog()
241 {
242 _blog = kFALSE;
243 }
245 {
246 _blog = _blog ? kFALSE : kTRUE;
247 }
248 Bool_t getLog()
249 {
250 return _blog;
251 }
252 virtual void printLog(Option_t *option = "RAS");
254
255 ClassDef(URANIE::Modeler::TkPCA, ID_MODELER)
256 //Definition of an variable
257
258};
259
260} // Fin du namespace Modeler
261} // Fin du namespace URANIE
262
263#endif
Interface de la classe URANIE::Modeler::TKernel.
Description of the class TKernel.
Definition TKernel.h:52
void setKernel(EKernelType nKernel)
Set the type of kernel without parameter.
EKernelType
Definition TKernel.h:55
Execute the Principal Component Analysis from a TDS.
Definition TkPCA.h:74
TKernel * _ker
Kernel constructor pointer.
Definition TkPCA.h:82
void setKernel(TKernel::EKernelType nKernel, Double_t dparam1, Double_t dparam2, Double_t dparam3)
Set the type of kernel with three parameters.
Definition TkPCA.h:187
URANIE::DataServer::TDSNtupleD * getResultNtupleD()
Return the NtupleD of results.
Definition TkPCA.h:153
URANIE::DataServer::TDataServer * _tds
Definition TkPCA.h:80
Bool_t _bCompletedFile
Add original data to final results (for plotting purpose)
Definition TkPCA.h:79
void compute(Option_t *option="")
The compute method.
Bool_t getLog()
Definition TkPCA.h:248
TList * _listOfInputAttributes
The list of attributes.
Definition TkPCA.h:85
TMatrixD _matKCent
The Centered and transformed Gram Matrix.
Definition TkPCA.h:88
void setLog()
Definition TkPCA.h:236
void drawkPCA(Int_t indX, Int_t indY, TString scut="", Option_t *option="")
Draw the Component.
virtual void printLog(Option_t *option="RAS")
void setKernel(TKernel::EKernelType nKernel, Double_t dparam1)
Definition TkPCA.h:168
void generateKCenteredMatrix(Option_t *option)
virtual ~TkPCA()
Default destructor.
void changeLog()
Definition TkPCA.h:244
TVectorD _vecPctEigenValues
The vector of sum (in percent) of the Eigenvalues.
Definition TkPCA.h:91
int _nS
Sample size.
Definition TkPCA.h:89
TkPCA(URANIE::DataServer::TDataServer *tds, const char *varexp="*", Option_t *option="")
Default constructor with TDS and attributes.
Bool_t _CentGram
Centering Gram matrix.
Definition TkPCA.h:78
Bool_t _blog
Boolean for edit the log.
Definition TkPCA.h:76
Bool_t _CentData
Centering Data matrix.
Definition TkPCA.h:77
void setKernel(TKernel::EKernelType nKernel, Double_t dparam1, Double_t dparam2)
Set the type of kernel with two parameters.
Definition TkPCA.h:177
void unsetLog()
Definition TkPCA.h:240
URANIE::DataServer::TDSNtupleD * _ntdResult
Pointer to a TDS.
Definition TkPCA.h:81
TVectorD _vecEigenValues
The vector of Eigenvalues.
Definition TkPCA.h:90
void setKernel(TKernel::EKernelType nKernel)
Set the type of kernel without parameter.
Definition TkPCA.h:161
TMatrixD _matK
The Gram matrix.
Definition TkPCA.h:87
ROOT.
Definition TAnisp.h:164