ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Types | List of all members
TMVA::DataSetFactory Class Reference

Definition at line 208 of file DataSetFactory.h.

Classes

class  EventStats
 

Public Member Functions

DataSetCreateDataSet (DataSetInfo &, DataInputHandler &)
 steering the creation of a new dataset More...
 

Static Public Member Functions

static DataSetFactoryInstance ()
 
static void destroyInstance ()
 
static DataSetFactoryNewInstance ()
 
static void destroyNewInstance (DataSetFactory *iOther)
 

Protected Member Functions

 ~DataSetFactory ()
 destructor More...
 
 DataSetFactory ()
 constructor More...
 
DataSetBuildInitialDataSet (DataSetInfo &, TMVA::DataInputHandler &)
 if no entries, than create a DataSet with one Event which uses dynamic variables (pointers to variables) More...
 
DataSetBuildDynamicDataSet (DataSetInfo &)
 
void BuildEventVector (DataSetInfo &dsi, DataInputHandler &dataInput, EventVectorOfClassesOfTreeType &eventsmap, EvtStatsPerClass &eventCounts)
 build empty event vectors distributes events between kTraining/kTesting/kMaxTreeType More...
 
DataSetMixEvents (DataSetInfo &dsi, EventVectorOfClassesOfTreeType &eventsmap, EvtStatsPerClass &eventCounts, const TString &splitMode, const TString &mixMode, const TString &normMode, UInt_t splitSeed)
 Select and distribute unassigned events to kTraining and kTesting Bool_t emptyUndefined = kTRUE;. More...
 
void RenormEvents (DataSetInfo &dsi, EventVectorOfClassesOfTreeType &eventsmap, const EvtStatsPerClass &eventCounts, const TString &normMode)
 

renormalisation of the TRAINING event weights -none (kind of obvious) . More...

 
void InitOptions (DataSetInfo &dsi, EvtStatsPerClass &eventsmap, TString &normMode, UInt_t &splitSeed, TString &splitMode, TString &mixMode)
 the dataset splitting More...
 
TMatrixDCalcCorrelationMatrix (DataSet *, const UInt_t classNumber)
 computes correlation matrix for variables "theVars" in tree; "theType" defines the required event "type" ("type" variable must be present in tree) More...
 
TMatrixDCalcCovarianceMatrix (DataSet *, const UInt_t classNumber)
 compute covariance matrix More...
 
void CalcMinMax (DataSet *, DataSetInfo &dsi)
 compute covariance matrix More...
 
void ResetBranchAndEventAddresses (TTree *)
 
void ResetCurrentTree ()
 
void ChangeToNewTree (TreeInfo &, const DataSetInfo &)
 While the data gets copied into the local training and testing trees, the input tree can change (for intance when changing from signal to background tree, or using TChains as input) The TTreeFormulas, that hold the input expressions need to be reassociated with the new tree, which is done here. More...
 
Bool_t CheckTTreeFormula (TTreeFormula *ttf, const TString &expression, Bool_t &hasDollar)
 checks a TTreeFormula for problems More...
 
Bool_t Verbose ()
 
MsgLoggerLog () const
 message logger More...
 

Protected Attributes

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

Static Protected Attributes

static DataSetFactoryfgInstance = 0
 

Private Types

typedef std::vector< Event * > EventVector
 
typedef std::vector< EventVectorEventVectorOfClasses
 
typedef std::map
< Types::ETreeType,
EventVectorOfClasses
EventVectorOfClassesOfTreeType
 
typedef std::map
< Types::ETreeType,
EventVector
EventVectorOfTreeType
 
typedef std::vector< Double_tValuePerClass
 
typedef std::map
< Types::ETreeType,
ValuePerClass
ValuePerClassOfTreeType
 
typedef std::vector< int > NumberPerClass
 
typedef std::vector< EventStatsEvtStatsPerClass
 

#include <TMVA/DataSetFactory.h>

Member Typedef Documentation

typedef std::vector<Event* > TMVA::DataSetFactory::EventVector
private

Definition at line 210 of file DataSetFactory.h.

Definition at line 211 of file DataSetFactory.h.

Definition at line 212 of file DataSetFactory.h.

Definition at line 213 of file DataSetFactory.h.

typedef std::vector< EventStats > TMVA::DataSetFactory::EvtStatsPerClass
private

Definition at line 245 of file DataSetFactory.h.

typedef std::vector< int > TMVA::DataSetFactory::NumberPerClass
private

Definition at line 244 of file DataSetFactory.h.

typedef std::vector< Double_t > TMVA::DataSetFactory::ValuePerClass
private

Definition at line 215 of file DataSetFactory.h.

Definition at line 216 of file DataSetFactory.h.

Constructor & Destructor Documentation

TMVA::DataSetFactory::~DataSetFactory ( )
protected

destructor

Definition at line 117 of file DataSetFactory.cxx.

TMVA::DataSetFactory::DataSetFactory ( )
protected

constructor

Definition at line 103 of file DataSetFactory.cxx.

Referenced by Instance(), and NewInstance().

Member Function Documentation

TMVA::DataSet * TMVA::DataSetFactory::BuildDynamicDataSet ( TMVA::DataSetInfo dsi)
protected

Definition at line 156 of file DataSetFactory.cxx.

void TMVA::DataSetFactory::BuildEventVector ( TMVA::DataSetInfo dsi,
TMVA::DataInputHandler dataInput,
EventVectorOfClassesOfTreeType eventsmap,
EvtStatsPerClass eventCounts 
)
protected

build empty event vectors distributes events between kTraining/kTesting/kMaxTreeType

Definition at line 684 of file DataSetFactory.cxx.

TMVA::DataSet * TMVA::DataSetFactory::BuildInitialDataSet ( DataSetInfo dsi,
TMVA::DataInputHandler dataInput 
)
protected

if no entries, than create a DataSet with one Event which uses dynamic variables (pointers to variables)

Definition at line 203 of file DataSetFactory.cxx.

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

computes correlation matrix for variables "theVars" in tree; "theType" defines the required event "type" ("type" variable must be present in tree)

Definition at line 511 of file DataSetFactory.cxx.

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

compute covariance matrix

Definition at line 542 of file DataSetFactory.cxx.

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

compute covariance matrix

Definition at line 442 of file DataSetFactory.cxx.

void TMVA::DataSetFactory::ChangeToNewTree ( TreeInfo tinfo,
const DataSetInfo dsi 
)
protected

While the data gets copied into the local training and testing trees, the input tree can change (for intance when changing from signal to background tree, or using TChains as input) The TTreeFormulas, that hold the input expressions need to be reassociated with the new tree, which is done here.

Definition at line 294 of file DataSetFactory.cxx.

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

checks a TTreeFormula for problems

Definition at line 252 of file DataSetFactory.cxx.

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

steering the creation of a new dataset

Definition at line 133 of file DataSetFactory.cxx.

static void TMVA::DataSetFactory::destroyInstance ( )
inlinestatic

Definition at line 253 of file DataSetFactory.h.

static void TMVA::DataSetFactory::destroyNewInstance ( DataSetFactory iOther)
inlinestatic

Definition at line 258 of file DataSetFactory.h.

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

void TMVA::DataSetFactory::InitOptions ( TMVA::DataSetInfo dsi,
EvtStatsPerClass eventsmap,
TString normMode,
UInt_t splitSeed,
TString splitMode,
TString mixMode 
)
protected

the dataset splitting

Definition at line 601 of file DataSetFactory.cxx.

static DataSetFactory& TMVA::DataSetFactory::Instance ( )
inlinestatic

Definition at line 252 of file DataSetFactory.h.

MsgLogger& TMVA::DataSetFactory::Log ( ) const
inlineprotected

message logger

Definition at line 330 of file DataSetFactory.h.

TMVA::DataSet * TMVA::DataSetFactory::MixEvents ( DataSetInfo dsi,
EventVectorOfClassesOfTreeType eventsmap,
EvtStatsPerClass eventCounts,
const TString splitMode,
const TString mixMode,
const TString normMode,
UInt_t  splitSeed 
)
protected

Select and distribute unassigned events to kTraining and kTesting Bool_t emptyUndefined = kTRUE;.

Definition at line 951 of file DataSetFactory.cxx.

static DataSetFactory* TMVA::DataSetFactory::NewInstance ( )
inlinestatic

Definition at line 257 of file DataSetFactory.h.

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

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


renormalisation of the TRAINING event weights -none (kind of obvious) .

. use the weights as supplied by the user.. (we store however the relative weight for later use) -numEvents -equalNumEvents reweight the training events such that the sum of all

backgr. (class > 0) weights equal that of the signal (class 0)

Definition at line 1392 of file DataSetFactory.cxx.

Referenced by MixEvents().

void TMVA::DataSetFactory::ResetBranchAndEventAddresses ( TTree )
protected
void TMVA::DataSetFactory::ResetCurrentTree ( )
inlineprotected

Definition at line 303 of file DataSetFactory.h.

Bool_t TMVA::DataSetFactory::Verbose ( )
inlineprotected

Definition at line 308 of file DataSetFactory.h.

Member Data Documentation

UInt_t TMVA::DataSetFactory::fCurrentEvtIdx
protected

the tree, events are currently read from

Definition at line 320 of file DataSetFactory.h.

TTree* TMVA::DataSetFactory::fCurrentTree
protected

how to deal with requested #events in connection with preselection cuts

Definition at line 319 of file DataSetFactory.h.

Referenced by ResetCurrentTree().

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

targets

Definition at line 325 of file DataSetFactory.h.

TMVA::DataSetFactory * TMVA::DataSetFactory::fgInstance = 0
staticprotected

Definition at line 264 of file DataSetFactory.h.

Referenced by destroyInstance(), and Instance().

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

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

Definition at line 323 of file DataSetFactory.h.

MsgLogger* TMVA::DataSetFactory::fLogger
protected

spectators

Definition at line 329 of file DataSetFactory.h.

Referenced by Log().

Bool_t TMVA::DataSetFactory::fScaleWithPreselEff
protected

VerboseLevel.

Definition at line 316 of file DataSetFactory.h.

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

weights

Definition at line 327 of file DataSetFactory.h.

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

input variables

Definition at line 324 of file DataSetFactory.h.

Bool_t TMVA::DataSetFactory::fVerbose
protected

Definition at line 313 of file DataSetFactory.h.

Referenced by Verbose().

TString TMVA::DataSetFactory::fVerboseLevel
protected

Verbosity.

Definition at line 314 of file DataSetFactory.h.

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

cuts

Definition at line 326 of file DataSetFactory.h.

Collaboration diagram for TMVA::DataSetFactory:
[legend]

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