28 #ifndef ROOT_TMVA_DataLoader 29 #define ROOT_TMVA_DataLoader 51 class DataInputHandler;
54 class VariableTransformBase;
55 class VarTransformHandler;
115 AddTree( tree,
"Regression", weight,
"", treetype );
123 const TCut& cut =
"",
138 AddTarget( expression, title, unit, min, max );
161 const TString& otherOpt=
"SplitMode=Random:!V" );
167 std::vector<std::vector<TMVA::Event*>>
SplitSets(std::vector<TMVA::Event*>& oldSet,
int seedNum,
int numFolds);
void AddBackgroundTree(TTree *background, Double_t weight=1.0, Types::ETreeType treetype=Types::kMaxTreeType)
number of signal events (used to compute significance)
DataSetManager * fDataSetManager
void AddTrainingEvent(const TString &className, const std::vector< Double_t > &event, Double_t weight)
add signal training event
std::vector< TMVA::VariableTransformBase * > fDefaultTrfs
DataLoader(TString thedlName="default")
void AddRegressionTarget(const TString &expression, const TString &title="", const TString &unit="", Double_t min=0, Double_t max=0)
std::vector< std::vector< TMVA::Event * > > fTrainBkgEvents
DataSetInfo & GetDataSetInfo()
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
TTree * CreateEventAssignTrees(const TString &name)
create the data assignment tree (for event-wise data assignment by user)
DataSetInfo & DefaultDataSetInfo()
default creation
DataLoader * VarTransform(TString trafoDefinition)
Transforms the variables and return a new DataLoader with the transformed variables.
void MakeKFoldDataSet(UInt_t numberFolds, bool validationSet=false)
Function required to split the training and testing datasets into a number of folds.
void SetBackgroundTree(TTree *background, Double_t weight=1.0)
DataInputHandler * fDataInputHandler
Types::EAnalysisType fAnalysisType
void AddBackgroundTestEvent(const std::vector< Double_t > &event, Double_t weight=1.0)
add signal training event
TH2 * GetCorrelationMatrix(const TString &className)
returns the correlation matrix of datasets
std::vector< std::vector< TMVA::Event * > > fTestBkgEvents
void AddVariable(const TString &expression, const TString &title, const TString &unit, char type='F', Double_t min=0, Double_t max=0)
user inserts discriminating variable in data set info
#define ClassDef(name, id)
void AddTestEvent(const TString &className, const std::vector< Double_t > &event, Double_t weight)
add signal test event
void SetInputTrees(const TString &signalFileName, const TString &backgroundFileName, Double_t signalWeight=1.0, Double_t backgroundWeight=1.0)
void SetTree(TTree *tree, const TString &className, Double_t weight)
set background tree
void PrepareFoldDataSet(UInt_t foldNumber, Types::ETreeType tt)
Function for assigning the correct folds to the testing or training set.
Abstract base class for all high level ml algorithms, you can book ml methods like BDT...
Class that contains all the data information.
void SetInputVariables(std::vector< TString > *theVariables)
fill input variables in data set
DataSetInfo & AddDataSet(DataSetInfo &)
void AddCut(const TString &cut, const TString &className="")
A specialized string object used for TTree selections.
void SetInputTreesFromEventAssignTrees()
assign event-wise local trees to data set
DataInputHandler & DataInput()
Service class for 2-Dim histogram classes.
std::vector< TTree * > fTestAssignTree
Bool_t UserAssignEvents(UInt_t clIndex)
std::vector< Float_t > fATreeEvent
void AddRegressionTree(TTree *tree, Double_t weight=1.0, Types::ETreeType treetype=Types::kMaxTreeType)
std::vector< std::vector< TMVA::Event * > > fTestSigEvents
This is the main MVA steering class.
DataLoader * MakeCopy(TString name)
Copy method use in VI and CV.
const DataSetInfo & GetDefaultDataSetInfo()
void AddTree(TTree *tree, const TString &className, Double_t weight=1.0, const TCut &cut="", Types::ETreeType tt=Types::kMaxTreeType)
void PrepareTrainingAndTestTree(const TCut &cut, const TString &splitOpt)
prepare the training and test trees -> same cuts for signal and background
DataAssignType fDataAssignType
void AddEvent(const TString &className, Types::ETreeType tt, const std::vector< Double_t > &event, Double_t weight)
add event vector event : the order of values is: variables + targets + spectators ...
Class that contains all the data information.
Describe directory structure in memory.
void SetBackgroundWeightExpression(const TString &variable)
void AddTarget(const TString &expression, const TString &title="", const TString &unit="", Double_t min=0, Double_t max=0)
user inserts target in data set info
void SetWeightExpression(const TString &variable, const TString &className="")
void AddBackgroundTrainingEvent(const std::vector< Double_t > &event, Double_t weight=1.0)
add signal training event
void SetSignalWeightExpression(const TString &variable)
std::vector< std::vector< TMVA::Event * > > fTrainSigEvents
Abstract ClassifierFactory template that handles arbitrary types.
std::vector< TTree * > fTrainAssignTree
void AddSignalTestEvent(const std::vector< Double_t > &event, Double_t weight=1.0)
add signal testing event
std::vector< std::vector< TMVA::Event * > > fValidBkgEvents
void AddSignalTrainingEvent(const std::vector< Double_t > &event, Double_t weight=1.0)
add signal training event
friend void DataLoaderCopy(TMVA::DataLoader *des, TMVA::DataLoader *src)
void SetSignalTree(TTree *signal, Double_t weight=1.0)
A TTree object has a header with a name and a title.
std::vector< std::vector< TMVA::Event * > > SplitSets(std::vector< TMVA::Event *> &oldSet, int seedNum, int numFolds)
Splits the input vector in to equally sized randomly sampled folds.
std::vector< std::vector< TMVA::Event * > > fValidSigEvents
void AddSignalTree(TTree *signal, Double_t weight=1.0, Types::ETreeType treetype=Types::kMaxTreeType)
number of signal events (used to compute significance)
void SetCut(const TString &cut, const TString &className="")
void AddSpectator(const TString &expression, const TString &title="", const TString &unit="", Double_t min=0, Double_t max=0)
user inserts target in data set info