TMVA::DataSetFactory Class Reference

#include <DataSetFactory.h>

List of all members.

Public Member Functions

DataSetCreateDataSet (DataSetInfo &, DataInputHandler &)
DataSetCreateDataSet (DataSetInfo &, DataInputHandler &)

Static Public Member Functions

static DataSetFactoryInstance ()
static void destroyInstance ()
static DataSetFactoryInstance ()
static void destroyInstance ()

Protected Member Functions

 ~DataSetFactory ()
 DataSetFactory ()
DataSetBuildInitialDataSet (DataSetInfo &, TMVA::DataInputHandler &)
DataSetBuildDynamicDataSet (DataSetInfo &)
void BuildEventVector (DataSetInfo &dsi, DataInputHandler &dataInput, EventVectorOfClassesOfTreeType &tmpEventVector)
DataSetMixEvents (DataSetInfo &dsi, EventVectorOfClassesOfTreeType &tmpEventVector, NumberPerClassOfTreeType &nTrainTestEvents, const TString &splitMode, const TString &mixMode, const TString &normMode, UInt_t splitSeed)
void RenormEvents (DataSetInfo &dsi, EventVectorOfClassesOfTreeType &tmpEventVector, const TString &normMode)
void InitOptions (DataSetInfo &dsi, NumberPerClassOfTreeType &nTrainTestEvents, TString &normMode, UInt_t &splitSeed, TString &splitMode, TString &mixMode)
TMatrixDCalcCorrelationMatrix (DataSet *, const UInt_t classNumber)
TMatrixDCalcCovarianceMatrix (DataSet *, const UInt_t classNumber)
void CalcMinMax (DataSet *, DataSetInfo &dsi)
void ResetBranchAndEventAddresses (TTree *)
void ResetCurrentTree ()
void ChangeToNewTree (TreeInfo &, const DataSetInfo &)
Bool_t CheckTTreeFormula (TTreeFormula *ttf, const TString &expression, Bool_t &hasDollar)
Bool_t Verbose ()
MsgLoggerLog () const
 message logger
 ~DataSetFactory ()
 DataSetFactory ()
DataSetBuildInitialDataSet (DataSetInfo &, TMVA::DataInputHandler &)
DataSetBuildDynamicDataSet (DataSetInfo &)
void BuildEventVector (DataSetInfo &dsi, DataInputHandler &dataInput, EventVectorOfClassesOfTreeType &tmpEventVector)
DataSetMixEvents (DataSetInfo &dsi, EventVectorOfClassesOfTreeType &tmpEventVector, NumberPerClassOfTreeType &nTrainTestEvents, const TString &splitMode, const TString &mixMode, const TString &normMode, UInt_t splitSeed)
void RenormEvents (DataSetInfo &dsi, EventVectorOfClassesOfTreeType &tmpEventVector, const TString &normMode)
void InitOptions (DataSetInfo &dsi, NumberPerClassOfTreeType &nTrainTestEvents, TString &normMode, UInt_t &splitSeed, TString &splitMode, TString &mixMode)
TMatrixDCalcCorrelationMatrix (DataSet *, const UInt_t classNumber)
TMatrixDCalcCovarianceMatrix (DataSet *, const UInt_t classNumber)
void CalcMinMax (DataSet *, DataSetInfo &dsi)
void ResetBranchAndEventAddresses (TTree *)
void ResetCurrentTree ()
void ChangeToNewTree (TreeInfo &, const DataSetInfo &)
Bool_t CheckTTreeFormula (TTreeFormula *ttf, const TString &expression, Bool_t &hasDollar)
Bool_t Verbose ()
MsgLoggerLog () const
 message logger

Protected Attributes

Bool_t fVerbose
TString fVerboseLevel
 Verbosity.
TTreefCurrentTree
 VerboseLevel.
UInt_t fCurrentEvtIdx
 the tree, events are currently read from
std::vector< TTreeFormula * > fInputFormulas
 the current event (to avoid reading of the same event)
std::vector< TTreeFormula * > fTargetFormulas
 input variables
std::vector< TTreeFormula * > fCutFormulas
 targets
std::vector< TTreeFormula * > fWeightFormula
 cuts
std::vector< TTreeFormula * > fSpectatorFormulas
 weights
MsgLoggerfLogger
 spectators
TTreefCurrentTree
 VerboseLevel.
std::vector< TTreeFormula * > fInputFormulas
 the current event (to avoid reading of the same event)
std::vector< TTreeFormula * > fTargetFormulas
 input variables
std::vector< TTreeFormula * > fCutFormulas
 targets
std::vector< TTreeFormula * > fWeightFormula
 cuts
std::vector< TTreeFormula * > fSpectatorFormulas
 weights
MsgLoggerfLogger
 spectators

Static Protected Attributes

static DataSetFactoryfgInstance
static DataSetFactoryfgInstance


Detailed Description

Definition at line 219 of file DataSetFactory.h.


Constructor & Destructor Documentation

TMVA::DataSetFactory::~DataSetFactory (  )  [protected]

Definition at line 110 of file DataSetFactory.cxx.

References fCutFormulas, fInputFormulas, fLogger, fSpectatorFormulas, fTargetFormulas, and fWeightFormula.

TMVA::DataSetFactory::DataSetFactory (  )  [protected]

Definition at line 98 of file DataSetFactory.cxx.

Referenced by Instance().

TMVA::DataSetFactory::~DataSetFactory (  )  [protected]

TMVA::DataSetFactory::DataSetFactory (  )  [protected]


Member Function Documentation

static DataSetFactory& TMVA::DataSetFactory::Instance (  )  [inline, static]

Definition at line 226 of file DataSetFactory.h.

References DataSetFactory(), and fgInstance.

Referenced by TMVA::DataSetManager::CreateDataSet().

static void TMVA::DataSetFactory::destroyInstance (  )  [inline, static]

Definition at line 227 of file DataSetFactory.h.

References fgInstance.

Referenced by TMVA::DataSetManager::~DataSetManager().

TMVA::DataSet * TMVA::DataSetFactory::CreateDataSet ( DataSetInfo ,
DataInputHandler  
)

Definition at line 125 of file DataSetFactory.cxx.

References BuildInitialDataSet(), CalcCorrelationMatrix(), CalcMinMax(), Endl, TMVA::DataSetInfo::GetClassInfo(), TMVA::ClassInfo::GetName(), TMVA::DataSetInfo::GetNClasses(), TMVA::DataSet::GetNEvents(), TMVA::kINFO, Log(), TMVA::DataSetInfo::PrintCorrelationMatrix(), and TMVA::DataSetInfo::SetCorrelationMatrix().

Referenced by TMVA::DataSetManager::CreateDataSet().

TMVA::DataSet * TMVA::DataSetFactory::BuildInitialDataSet ( DataSetInfo ,
TMVA::DataInputHandler  
) [protected]

Definition at line 181 of file DataSetFactory.cxx.

References BuildDynamicDataSet(), BuildEventVector(), Endl, TMVA::DataInputHandler::GetClassList(), TMVA::DataInputHandler::GetEntries(), TMVA::DataSet::GetNClassEvents(), InitOptions(), kFALSE, TMVA::kINFO, Log(), and MixEvents().

Referenced by CreateDataSet().

TMVA::DataSet * TMVA::DataSetFactory::BuildDynamicDataSet ( DataSetInfo  )  [protected]

Definition at line 147 of file DataSetFactory.cxx.

References TMVA::DataSetInfo::AddClass(), Endl, Event, TMVA::DataSetInfo::GetClassInfo(), TMVA::DataSetInfo::GetNClasses(), TMVA::DataSetInfo::GetSpectatorInfos(), TMVA::DataSetInfo::GetVariableInfos(), TMVA::kDEBUG, TMVA::Types::kTraining, Log(), TMVA::DataSet::SetCurrentEvent(), TMVA::DataSet::SetCurrentType(), TMVA::DataSet::SetEventCollection(), and TMVA::ClassInfo::SetNumber().

Referenced by BuildInitialDataSet().

void TMVA::DataSetFactory::BuildEventVector ( DataSetInfo dsi,
DataInputHandler dataInput,
EventVectorOfClassesOfTreeType tmpEventVector 
) [protected]

Definition at line 649 of file DataSetFactory.cxx.

References TMVA::DataInputHandler::begin(), ChangeToNewTree(), TObject::ClassName(), TMVA::DataInputHandler::end(), Endl, TTreeFormula::EvalInstance(), Event, fCutFormulas, fInputFormulas, fSpectatorFormulas, fTargetFormulas, fWeightFormula, TMVA::DataSetInfo::GetClassInfo(), TMVA::DataSetInfo::GetClassNameMaxLength(), TTree::GetCurrentFile(), TMVA::ClassInfo::GetCut(), TTree::GetDirectory(), TTree::GetEntries(), TMVA::DataInputHandler::GetEntries(), TTree::GetEntry(), TDirectory::GetFile(), TNamed::GetName(), TMVA::ClassInfo::GetName(), TMVA::DataSetInfo::GetNClasses(), TTreeFormula::GetNdata(), TMVA::DataSetInfo::GetNSpectators(), TMVA::DataSetInfo::GetNTargets(), TMVA::DataSetInfo::GetNVariables(), TNamed::GetTitle(), TMVA::TreeInfo::GetTree(), TTree::GetTree(), TMVA::TreeInfo::GetTreeType(), TMVA::ClassInfo::GetWeight(), TMVA::TreeInfo::GetWeight(), TMVA::DataSetInfo::HasCuts(), i, TMath::IsNaN(), TMVA::kERROR, kFALSE, TMVA::kFATAL, TMVA::kINFO, TMVA::Types::kMaxTreeType, TMVA::Types::kTesting, TMVA::Types::kTraining, kTRUE, TMVA::kWARNING, TTree::LoadTree(), Log(), Long64_t, ndata, TTree::ResetBranchAddresses(), and size_t.

Referenced by BuildInitialDataSet().

TMVA::DataSet * TMVA::DataSetFactory::MixEvents ( DataSetInfo dsi,
EventVectorOfClassesOfTreeType tmpEventVector,
NumberPerClassOfTreeType nTrainTestEvents,
const TString splitMode,
const TString mixMode,
const TString normMode,
UInt_t  splitSeed 
) [protected]

Definition at line 933 of file DataSetFactory.cxx.

References TMath::Abs(), TString::Contains(), Endl, generate(), TMVA::DataSetInfo::GetNClasses(), TMVA::kDEBUG, TMVA::kFATAL, TMVA::kINFO, TMVA::Types::kMaxTreeType, TMVA::Types::kTesting, TMVA::Types::kTraining, kTRUE, TMVA::kWARNING, Log(), TMath::Max(), NULL, RenormEvents(), rndm, TMVA::DataSet::SetEventCollection(), and size.

Referenced by BuildInitialDataSet().

void TMVA::DataSetFactory::RenormEvents ( DataSetInfo dsi,
EventVectorOfClassesOfTreeType tmpEventVector,
const TString normMode 
) [protected]

Definition at line 1310 of file DataSetFactory.cxx.

References TMVA::compose_binary(), Endl, TMVA::DataSetInfo::GetClassInfo(), TMVA::DataSetInfo::GetClassNameMaxLength(), TMVA::ClassInfo::GetName(), TMVA::DataSetInfo::GetNClasses(), TMVA::Event::GetOriginalWeight(), TMVA::kFATAL, TMVA::kINFO, TMVA::Types::kTesting, TMVA::Types::kTraining, Log(), TMVA::Event::ScaleWeight(), and TMVA::DataSetInfo::SetNormalization().

Referenced by MixEvents().

void TMVA::DataSetFactory::InitOptions ( DataSetInfo dsi,
NumberPerClassOfTreeType nTrainTestEvents,
TString normMode,
UInt_t splitSeed,
TString splitMode,
TString mixMode 
) [protected]

Definition at line 565 of file DataSetFactory.cxx.

References TString::CompareTo(), TString::Data(), Endl, fLogger, TString::Format(), fVerbose, fVerboseLevel, TMVA::DataSetInfo::GetClassInfo(), TMVA::ClassInfo::GetName(), TMVA::DataSetInfo::GetNClasses(), TMVA::DataSetInfo::GetSplitOptions(), TMVA::kDEBUG, TMVA::kINFO, TMVA::Types::kTesting, TMVA::Types::kTraining, TMVA::kVERBOSE, Log(), TMVA::MsgLogger::SetMinType(), TString::ToUpper(), and Verbose().

Referenced by BuildInitialDataSet().

TMatrixD * TMVA::DataSetFactory::CalcCorrelationMatrix ( DataSet ,
const UInt_t  classNumber 
) [protected]

Definition at line 474 of file DataSetFactory.cxx.

References CalcCovarianceMatrix(), d, Endl, TMVA::DataSet::GetNVariables(), TMVA::kWARNING, Log(), and sqrt().

Referenced by CreateDataSet().

TMatrixD * TMVA::DataSetFactory::CalcCovarianceMatrix ( DataSet ,
const UInt_t  classNumber 
) [protected]

Definition at line 507 of file DataSetFactory.cxx.

References TMVA::DataSet::GetEvent(), TMVA::DataSet::GetNEvents(), TMVA::DataSet::GetNVariables(), and i.

Referenced by CalcCorrelationMatrix().

void TMVA::DataSetFactory::CalcMinMax ( DataSet ,
DataSetInfo dsi 
) [protected]

Definition at line 408 of file DataSetFactory.cxx.

References TMath::Abs(), TString::Data(), Endl, TMVA::DataSet::GetEvent(), TMVA::VariableInfo::GetExpression(), TMVA::DataSet::GetNEvents(), TMVA::DataSet::GetNSpectators(), TMVA::DataSet::GetNTargets(), TMVA::DataSet::GetNVariables(), TMVA::DataSetInfo::GetSpectatorInfo(), TMVA::DataSetInfo::GetTargetInfo(), TMVA::DataSetInfo::GetVariableInfo(), i, TMVA::kFATAL, Log(), max, min, TMVA::VariableInfo::SetMax(), and TMVA::VariableInfo::SetMin().

Referenced by CreateDataSet().

void TMVA::DataSetFactory::ResetBranchAndEventAddresses ( TTree  )  [protected]

void TMVA::DataSetFactory::ResetCurrentTree (  )  [inline, protected]

Definition at line 272 of file DataSetFactory.h.

References fCurrentTree.

void TMVA::DataSetFactory::ChangeToNewTree ( TreeInfo ,
const DataSetInfo  
) [protected]

Definition at line 256 of file DataSetFactory.cxx.

References CheckTTreeFormula(), TString::Data(), Endl, fCutFormulas, fInputFormulas, Form(), fSpectatorFormulas, fTargetFormulas, fWeightFormula, TLeaf::GetBranch(), TMVA::DataSetInfo::GetClassInfo(), TMVA::TreeInfo::GetClassName(), TMVA::ClassInfo::GetCut(), TMVA::VariableInfo::GetExpression(), TMVA::VariableInfo::GetInternalName(), TTreeFormula::GetLeaf(), TNamed::GetName(), TMVA::ClassInfo::GetName(), TMVA::DataSetInfo::GetNClasses(), TTreeFormula::GetNcodes(), TMVA::DataSetInfo::GetNSpectators(), TMVA::DataSetInfo::GetNTargets(), TMVA::DataSetInfo::GetNVariables(), TMVA::DataSetInfo::GetSpectatorInfo(), TMVA::DataSetInfo::GetTargetInfo(), TMVA::TreeInfo::GetTree(), TTree::GetTree(), TMVA::DataSetInfo::GetVariableInfo(), TMVA::ClassInfo::GetWeight(), i, TMVA::kDEBUG, kFALSE, TMVA::kWARNING, Log(), and TTree::SetBranchStatus().

Referenced by BuildEventVector().

Bool_t TMVA::DataSetFactory::CheckTTreeFormula ( TTreeFormula ttf,
const TString expression,
Bool_t hasDollar 
) [protected]

Definition at line 229 of file DataSetFactory.cxx.

References TString::Contains(), TString::Data(), Endl, TTreeFormula::GetNdata(), TFormula::GetNdim(), kFALSE, TMVA::kFATAL, kTRUE, TMVA::kWARNING, and Log().

Referenced by ChangeToNewTree().

Bool_t TMVA::DataSetFactory::Verbose (  )  [inline, protected]

Definition at line 277 of file DataSetFactory.h.

References fVerbose.

Referenced by InitOptions().

MsgLogger& TMVA::DataSetFactory::Log (  )  const [inline, protected]

message logger

Definition at line 297 of file DataSetFactory.h.

References fLogger.

Referenced by BuildDynamicDataSet(), BuildEventVector(), BuildInitialDataSet(), CalcCorrelationMatrix(), CalcMinMax(), ChangeToNewTree(), CheckTTreeFormula(), CreateDataSet(), InitOptions(), MixEvents(), and RenormEvents().

static DataSetFactory& TMVA::DataSetFactory::Instance (  )  [inline, static]

Definition at line 226 of file DataSetFactory.h.

References DataSetFactory(), and fgInstance.

static void TMVA::DataSetFactory::destroyInstance (  )  [inline, static]

Definition at line 227 of file DataSetFactory.h.

References fgInstance.

DataSet* TMVA::DataSetFactory::CreateDataSet ( DataSetInfo ,
DataInputHandler  
)

DataSet* TMVA::DataSetFactory::BuildInitialDataSet ( DataSetInfo ,
TMVA::DataInputHandler  
) [protected]

DataSet* TMVA::DataSetFactory::BuildDynamicDataSet ( DataSetInfo  )  [protected]

void TMVA::DataSetFactory::BuildEventVector ( DataSetInfo dsi,
DataInputHandler dataInput,
EventVectorOfClassesOfTreeType tmpEventVector 
) [protected]

DataSet* TMVA::DataSetFactory::MixEvents ( DataSetInfo dsi,
EventVectorOfClassesOfTreeType tmpEventVector,
NumberPerClassOfTreeType nTrainTestEvents,
const TString splitMode,
const TString mixMode,
const TString normMode,
UInt_t  splitSeed 
) [protected]

void TMVA::DataSetFactory::RenormEvents ( DataSetInfo dsi,
EventVectorOfClassesOfTreeType tmpEventVector,
const TString normMode 
) [protected]

void TMVA::DataSetFactory::InitOptions ( DataSetInfo dsi,
NumberPerClassOfTreeType nTrainTestEvents,
TString normMode,
UInt_t splitSeed,
TString splitMode,
TString mixMode 
) [protected]

TMatrixD* TMVA::DataSetFactory::CalcCorrelationMatrix ( DataSet ,
const UInt_t  classNumber 
) [protected]

TMatrixD* TMVA::DataSetFactory::CalcCovarianceMatrix ( DataSet ,
const UInt_t  classNumber 
) [protected]

void TMVA::DataSetFactory::CalcMinMax ( DataSet ,
DataSetInfo dsi 
) [protected]

void TMVA::DataSetFactory::ResetBranchAndEventAddresses ( TTree  )  [protected]

void TMVA::DataSetFactory::ResetCurrentTree (  )  [inline, protected]

Definition at line 272 of file DataSetFactory.h.

References fCurrentTree.

void TMVA::DataSetFactory::ChangeToNewTree ( TreeInfo ,
const DataSetInfo  
) [protected]

Bool_t TMVA::DataSetFactory::CheckTTreeFormula ( TTreeFormula ttf,
const TString expression,
Bool_t hasDollar 
) [protected]

Bool_t TMVA::DataSetFactory::Verbose ( void   )  [inline, protected]

Definition at line 277 of file DataSetFactory.h.

References fVerbose.

MsgLogger& TMVA::DataSetFactory::Log (  )  const [inline, protected]

message logger

Definition at line 297 of file DataSetFactory.h.

References fLogger.


Member Data Documentation

TMVA::DataSetFactory * TMVA::DataSetFactory::fgInstance [static, protected]

Definition at line 236 of file DataSetFactory.h.

Referenced by destroyInstance(), and Instance().

Bool_t TMVA::DataSetFactory::fVerbose [protected]

Definition at line 282 of file DataSetFactory.h.

Referenced by InitOptions(), and Verbose().

TString TMVA::DataSetFactory::fVerboseLevel [protected]

Verbosity.

Definition at line 283 of file DataSetFactory.h.

Referenced by InitOptions().

TTree* TMVA::DataSetFactory::fCurrentTree [mutable, protected]

VerboseLevel.

Definition at line 286 of file DataSetFactory.h.

Referenced by ResetCurrentTree().

UInt_t TMVA::DataSetFactory::fCurrentEvtIdx [mutable, protected]

the tree, events are currently read from

Definition at line 287 of file DataSetFactory.h.

std::vector<TTreeFormula*> TMVA::DataSetFactory::fInputFormulas [protected]

the current event (to avoid reading of the same event)

Definition at line 290 of file DataSetFactory.h.

Referenced by BuildEventVector(), ChangeToNewTree(), and ~DataSetFactory().

std::vector<TTreeFormula*> TMVA::DataSetFactory::fTargetFormulas [protected]

input variables

Definition at line 291 of file DataSetFactory.h.

Referenced by BuildEventVector(), ChangeToNewTree(), and ~DataSetFactory().

std::vector<TTreeFormula*> TMVA::DataSetFactory::fCutFormulas [protected]

targets

Definition at line 292 of file DataSetFactory.h.

Referenced by BuildEventVector(), ChangeToNewTree(), and ~DataSetFactory().

std::vector<TTreeFormula*> TMVA::DataSetFactory::fWeightFormula [protected]

cuts

Definition at line 293 of file DataSetFactory.h.

Referenced by BuildEventVector(), ChangeToNewTree(), and ~DataSetFactory().

std::vector<TTreeFormula*> TMVA::DataSetFactory::fSpectatorFormulas [protected]

weights

Definition at line 294 of file DataSetFactory.h.

Referenced by BuildEventVector(), ChangeToNewTree(), and ~DataSetFactory().

MsgLogger* TMVA::DataSetFactory::fLogger [mutable, protected]

spectators

Definition at line 296 of file DataSetFactory.h.

Referenced by InitOptions(), Log(), and ~DataSetFactory().

DataSetFactory* TMVA::DataSetFactory::fgInstance [static, protected]

Definition at line 236 of file DataSetFactory.h.

TTree* TMVA::DataSetFactory::fCurrentTree [mutable, protected]

VerboseLevel.

Definition at line 286 of file DataSetFactory.h.

std::vector<TTreeFormula*> TMVA::DataSetFactory::fInputFormulas [protected]

the current event (to avoid reading of the same event)

Definition at line 290 of file DataSetFactory.h.

std::vector<TTreeFormula*> TMVA::DataSetFactory::fTargetFormulas [protected]

input variables

Definition at line 291 of file DataSetFactory.h.

std::vector<TTreeFormula*> TMVA::DataSetFactory::fCutFormulas [protected]

targets

Definition at line 292 of file DataSetFactory.h.

std::vector<TTreeFormula*> TMVA::DataSetFactory::fWeightFormula [protected]

cuts

Definition at line 293 of file DataSetFactory.h.

std::vector<TTreeFormula*> TMVA::DataSetFactory::fSpectatorFormulas [protected]

weights

Definition at line 294 of file DataSetFactory.h.

MsgLogger* TMVA::DataSetFactory::fLogger [mutable, protected]

spectators

Definition at line 296 of file DataSetFactory.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 17:01:23 2011 for ROOT_528-00b_version by  doxygen 1.5.1