55 for (
Int_t n = 0;
n < nPoints; ++
n) {
56 x = rng.Rndm() * scale;
57 y = offset + rng.Rndm() * scale;
62 data->ResetBranchAddresses();
74void TMVAMinimalClassification()
76 TString outputFilename =
"out.root";
77 TFile *outFile =
new TFile(outputFilename,
"RECREATE");
80 TTree *signalTree = genTree(1000, 0.0, 2.0, 100);
81 TTree *backgroundTree = genTree(1000, 1.0, 2.0, 101);
83 TString factoryOptions =
"AnalysisType=Classification";
96 TCut backgroundCut =
"";
97 TString datasetOptions =
"SplitMode=Random";
114 delete backgroundTree;
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
double Double_t
Double 8 bytes.
A specialized string object used for TTree selections.
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
void Close(Option_t *option="") override
Close a file.
void AddSignalTree(TTree *signal, Double_t weight=1.0, Types::ETreeType treetype=Types::kMaxTreeType)
number of signal events (used to compute significance)
void PrepareTrainingAndTestTree(const TCut &cut, const TString &splitOpt)
prepare the training and test trees -> same cuts for signal and background
void AddBackgroundTree(TTree *background, Double_t weight=1.0, Types::ETreeType treetype=Types::kMaxTreeType)
number of signal events (used to compute significance)
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
This is the main MVA steering class.
void TrainAllMethods()
Iterates through all booked methods and calls training.
void TestAllMethods()
Evaluates all booked methods on the testing data and adds the output to the Results in the corresponi...
void EvaluateAllMethods(void)
Iterates over all MVAs that have been booked, and calls their evaluation methods.
MethodBase * BookMethod(DataLoader *loader, MethodName theMethodName, TString methodTitle, TString theOption="")
Books an MVA classifier or regression method.
This is the base class for the ROOT Random number generators.
A TTree represents a columnar dataset.