52 data->Branch(
"x", &
x,
"x/D");
53 data->Branch(
"y", &
y,
"y/D");
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";
90 dataloader.AddVariable(
"y",
'D');
92 dataloader.AddSignalTree(signalTree, 1.0);
93 dataloader.AddBackgroundTree(backgroundTree, 1.0);
96 TCut backgroundCut =
"";
97 TString datasetOptions =
"SplitMode=Random";
98 dataloader.PrepareTrainingAndTestTree(signalCut, backgroundCut, datasetOptions);
105 factory.TrainAllMethods();
106 factory.TestAllMethods();
107 factory.EvaluateAllMethods();
114 delete backgroundTree;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
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 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.
This is the base class for the ROOT Random number generators.
A TTree represents a columnar dataset.