FairRoot/PandaRoot
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
PndPDEFoamTrain Class Referenceabstract

#include <PndPDEFoamTrain.h>

Inheritance diagram for PndPDEFoamTrain:
PndMvaTrainer

Public Member Functions

 PndPDEFoamTrain (const std::string &InPutFile, const std::vector< std::string > &ClassNames, const std::vector< std::string > &VarNames, bool trim=true)
 
virtual ~PndPDEFoamTrain ()
 
void Train ()
 Derived classes need to implement this methode. More...
 
void TrainPar ()
 
virtual void storeWeights ()=0
 
void SetTestSetSize (size_t percent=50)
 
void SetTestSet (std::set< size_t > const &testSet)
 
void NormalizeData (NormType t=NONORM)
 
void PCATransForm ()
 
void SetOutPutFile (std::string const &outFile)
 
void WriteErroVect (std::string const &FileName) const
 
std::vector< StepError > const & GetErrorValues () const
 
virtual void Initialize ()
 
std::set< size_t > const & GetTestEvetIdx () const
 
std::vector< PndMvaClass > const & GetClasses () const
 Get the list of available classes (labels). More...
 
std::vector< PndMvaVariable >
const & 
GetVariables () const
 Get the list of available variables. More...
 
virtual void EvalClassifierError ()
 
size_t GetRndSeed () const
 
void SetRndSeed (size_t const sd)
 

Protected Member Functions

void WriteFoamsToFile ()
 
void InitFoam (TMVA::PDEFoam *pdefoam, TMVA::EFoamType ft)
 
void SetXminXmax (TMVA::PDEFoam *pdefoam)
 
void CalcXminXmax ()
 
void FillVariableNamesToFoam () const
 
void SetAppType (AppType t)
 
void WriteToWeightFile (std::vector< std::pair< std::string, std::vector< float > * > > const &weights) const
 
void splitTetsSet ()
 

Protected Attributes

std::set< size_t > m_testSet_indices
 Indices of the test set. More...
 
PndMvaDataSet m_dataSets
 Data set. Holds event values. More...
 
std::vector< StepErrorm_StepErro
 Container to keep per step error values. More...
 
std::string m_outFile
 Output filename. More...
 
size_t m_RND_seed
 Random seed. More...
 

Private Member Functions

 PndPDEFoamTrain (const PndPDEFoamTrain &other)
 
PndPDEFoamTrainoperator= (const PndPDEFoamTrain &other)
 
void Init ()
 

Private Attributes

std::vector< TMVA::PDEFoam * > m_foams
 
std::vector< float > Xmin
 
std::vector< float > Xmax
 
int m_VolFrac
 
int m_nCells
 
int m_nSampl
 
int m_nBin
 
int m_OptRej
 
int m_OptDrive
 
int m_EvPerBin
 
int m_Chat
 
bool m_SigBgSeparated
 
double m_Frac
 
int m_nActiveCells
 
TMVA::EKernel m_Kernel
 
bool m_CutNmin
 
int m_Nmin
 
bool m_CutRMSmin
 
double m_RMSmin
 
TRandom3 * PseRan
 

Detailed Description

Definition at line 20 of file PndPDEFoamTrain.h.

Constructor & Destructor Documentation

PndPDEFoamTrain::PndPDEFoamTrain ( const std::string &  InPutFile,
const std::vector< std::string > &  ClassNames,
const std::vector< std::string > &  VarNames,
bool  trim = true 
)
virtual PndPDEFoamTrain::~PndPDEFoamTrain ( )
virtual
PndPDEFoamTrain::PndPDEFoamTrain ( const PndPDEFoamTrain other)
private

Member Function Documentation

void PndPDEFoamTrain::CalcXminXmax ( )
protected
virtual void PndMvaTrainer::EvalClassifierError ( )
virtualinherited

Classifier evaluation.

Reimplemented in PndLVQTrain.

void PndPDEFoamTrain::FillVariableNamesToFoam ( ) const
protected
std::vector< PndMvaClass > const & PndMvaTrainer::GetClasses ( ) const
inlineinherited

Get the list of available classes (labels).

Get the list of available classes (labels). Vector containing available labels.

Definition at line 226 of file PndMvaTrainer.h.

References PndMvaDataSet::GetClasses(), and PndMvaTrainer::m_dataSets.

227 {
228  return m_dataSets.GetClasses();
229 };
PndMvaDataSet m_dataSets
Data set. Holds event values.
std::vector< PndMvaClass > const & GetClasses() const
Get the list of available classes (labels).
std::vector< StepError > const & PndMvaTrainer::GetErrorValues ( ) const
inlineinherited

Get the list of objects that contain the classifier evaluation results.

Returns
List of evaluation objects.

Definition at line 238 of file PndMvaTrainer.h.

References PndMvaTrainer::m_StepErro.

239 {
240  return m_StepErro;
241 };
std::vector< StepError > m_StepErro
Container to keep per step error values.
size_t PndMvaTrainer::GetRndSeed ( ) const
inlineinherited

Definition at line 200 of file PndMvaTrainer.h.

References PndMvaTrainer::m_RND_seed.

201 {
202  return this->m_RND_seed;
203 };
size_t m_RND_seed
Random seed.
std::set< size_t > const & PndMvaTrainer::GetTestEvetIdx ( ) const
inlineinherited

Get the indices of the events selected to be used for testing.

Returns
A set containing the indices of test events.

Definition at line 220 of file PndMvaTrainer.h.

References PndMvaTrainer::m_testSet_indices.

221 {
222  return m_testSet_indices;
223 };
std::set< size_t > m_testSet_indices
Indices of the test set.
std::vector< PndMvaVariable > const & PndMvaTrainer::GetVariables ( ) const
inlineinherited

Get the list of available variables.

Get the list of available variables. Vector containing available Parameters (features).

Definition at line 232 of file PndMvaTrainer.h.

References PndMvaDataSet::GetVars(), and PndMvaTrainer::m_dataSets.

233 {
234  return m_dataSets.GetVars();
235 };
PndMvaDataSet m_dataSets
Data set. Holds event values.
std::vector< PndMvaVariable > const & GetVars() const
Get the list of available variables.
void PndPDEFoamTrain::Init ( )
private
void PndPDEFoamTrain::InitFoam ( TMVA::PDEFoam *  pdefoam,
TMVA::EFoamType  ft 
)
protected
virtual void PndMvaTrainer::Initialize ( )
virtualinherited

Initialize data structures.

Reimplemented in PndMultiClassBdtTrain, and PndMultiClassMlpTrain.

void PndMvaTrainer::NormalizeData ( NormType  t = NONORM)
inherited

Select input data normalization scheme.

PndPDEFoamTrain& PndPDEFoamTrain::operator= ( const PndPDEFoamTrain other)
private
void PndMvaTrainer::PCATransForm ( )
inherited

Parameter decorrelation. Performs PCA (Principal component analysis) on the input dataset.

void PndMvaTrainer::SetAppType ( AppType  t)
inlineprotectedinherited

Set application type for the current object

Definition at line 215 of file PndMvaTrainer.h.

References PndMvaTrainer::m_dataSets, and PndMvaDataSet::SetAppType().

216 {
218 };
PndMvaDataSet m_dataSets
Data set. Holds event values.
void SetAppType(AppType t)
TTree * t
Definition: bump_analys.C:13
void PndMvaTrainer::SetOutPutFile ( std::string const &  outFile)
inlineinherited

Setter to set the weightfile name.

Parameters
outFileOutput filename.

Definition at line 210 of file PndMvaTrainer.h.

References PndMvaTrainer::m_outFile, and outFile.

211 {
212  m_outFile = outFile;
213 };
TString outFile
Definition: hit_dirc.C:17
std::string m_outFile
Output filename.
void PndMvaTrainer::SetRndSeed ( size_t const  sd)
inlineinherited

Definition at line 205 of file PndMvaTrainer.h.

References PndMvaTrainer::m_RND_seed.

206 {
207  this->m_RND_seed = sd;
208 };
size_t m_RND_seed
Random seed.
void PndMvaTrainer::SetTestSet ( std::set< size_t > const &  testSet)
inherited

Set the indices of events that are going to be used for testing.

Parameters
testSetSet containing the indices of the test events.
void PndMvaTrainer::SetTestSetSize ( size_t  percent = 50)
inherited

Creates test and train data sets.

Parameters
percentPercent of the data set to be used for testing.
void PndPDEFoamTrain::SetXminXmax ( TMVA::PDEFoam *  pdefoam)
protected
void PndMvaTrainer::splitTetsSet ( )
protectedinherited
virtual void PndMvaTrainer::storeWeights ( )
pure virtualinherited

Store weights in the output File. If output file name is not specified, then write nothing.

Implemented in PndLVQTrain, PndMultiClassBdtTrain, PndMultiClassMlpTrain, and PndKnnTrain.

void PndPDEFoamTrain::Train ( )
virtual

Derived classes need to implement this methode.

Implements PndMvaTrainer.

void PndPDEFoamTrain::TrainPar ( )
void PndMvaTrainer::WriteErroVect ( std::string const &  FileName) const
inherited

Writes the train and test errors evaluations to a given file.

Parameters
FileNameOutput file name.
void PndPDEFoamTrain::WriteFoamsToFile ( )
protected
void PndMvaTrainer::WriteToWeightFile ( std::vector< std::pair< std::string, std::vector< float > * > > const &  weights) const
protectedinherited

Write the training and normalization data to outFile.

Member Data Documentation

int PndPDEFoamTrain::m_Chat
private

Definition at line 62 of file PndPDEFoamTrain.h.

bool PndPDEFoamTrain::m_CutNmin
private

Definition at line 70 of file PndPDEFoamTrain.h.

bool PndPDEFoamTrain::m_CutRMSmin
private

Definition at line 72 of file PndPDEFoamTrain.h.

PndMvaDataSet PndMvaTrainer::m_dataSets
protectedinherited

Data set. Holds event values.

Definition at line 175 of file PndMvaTrainer.h.

Referenced by PndMvaTrainer::GetClasses(), PndMvaTrainer::GetVariables(), and PndMvaTrainer::SetAppType().

int PndPDEFoamTrain::m_EvPerBin
private

Definition at line 61 of file PndPDEFoamTrain.h.

std::vector<TMVA::PDEFoam*> PndPDEFoamTrain::m_foams
private

Definition at line 50 of file PndPDEFoamTrain.h.

double PndPDEFoamTrain::m_Frac
private

Definition at line 64 of file PndPDEFoamTrain.h.

TMVA::EKernel PndPDEFoamTrain::m_Kernel
private

Definition at line 67 of file PndPDEFoamTrain.h.

int PndPDEFoamTrain::m_nActiveCells
private

Definition at line 65 of file PndPDEFoamTrain.h.

int PndPDEFoamTrain::m_nBin
private

Definition at line 58 of file PndPDEFoamTrain.h.

int PndPDEFoamTrain::m_nCells
private

Definition at line 56 of file PndPDEFoamTrain.h.

int PndPDEFoamTrain::m_Nmin
private

Definition at line 71 of file PndPDEFoamTrain.h.

int PndPDEFoamTrain::m_nSampl
private

Definition at line 57 of file PndPDEFoamTrain.h.

int PndPDEFoamTrain::m_OptDrive
private

Definition at line 60 of file PndPDEFoamTrain.h.

int PndPDEFoamTrain::m_OptRej
private

Definition at line 59 of file PndPDEFoamTrain.h.

std::string PndMvaTrainer::m_outFile
protectedinherited

Output filename.

Definition at line 181 of file PndMvaTrainer.h.

Referenced by PndMvaTrainer::SetOutPutFile().

double PndPDEFoamTrain::m_RMSmin
private

Definition at line 73 of file PndPDEFoamTrain.h.

size_t PndMvaTrainer::m_RND_seed
protectedinherited

Random seed.

Definition at line 184 of file PndMvaTrainer.h.

Referenced by PndMvaTrainer::GetRndSeed(), and PndMvaTrainer::SetRndSeed().

bool PndPDEFoamTrain::m_SigBgSeparated
private

Definition at line 63 of file PndPDEFoamTrain.h.

std::vector<StepError> PndMvaTrainer::m_StepErro
protectedinherited

Container to keep per step error values.

Definition at line 178 of file PndMvaTrainer.h.

Referenced by PndMvaTrainer::GetErrorValues().

std::set<size_t> PndMvaTrainer::m_testSet_indices
protectedinherited

Indices of the test set.

Definition at line 172 of file PndMvaTrainer.h.

Referenced by PndMvaTrainer::GetTestEvetIdx().

int PndPDEFoamTrain::m_VolFrac
private

Definition at line 55 of file PndPDEFoamTrain.h.

TRandom3* PndPDEFoamTrain::PseRan
private

Definition at line 75 of file PndPDEFoamTrain.h.

std::vector<float> PndPDEFoamTrain::Xmax
private

Definition at line 53 of file PndPDEFoamTrain.h.

std::vector<float> PndPDEFoamTrain::Xmin
private

Definition at line 53 of file PndPDEFoamTrain.h.


The documentation for this class was generated from the following file: