44 tree->SetBranchAddress(
"x", &
x);
45 tree->SetBranchAddress(
"y", &
y);
46 tree->SetBranchAddress(
"eventID", &eventID);
48 for (
Int_t n = 0;
n < nPoints; ++
n) {
60 tree->ResetBranchAddresses();
64int TMVACrossValidationApplication()
81 TString jobname(
"TMVACrossValidation");
84 TString weightfile =
TString(
"datasetcv/weights/") + jobname +
"_" + methodName +
TString(
".weights.xml");
87 if (weightfileExists) {
88 reader->
BookMVA(methodName, weightfile);
90 std::cout <<
"Weightfile for method " << methodName <<
" not found."
91 " Did you run TMVACrossValidation with a specified"
92 " splitExpr?" << std::endl;
99 TString weightfile =
TString(
"datasetcv/weights/") + jobname +
"_" + methodName +
TString(
".weights.xml");
102 if (weightfileExists) {
103 reader->
BookMVA(methodName, weightfile);
105 std::cout <<
"Weightfile for method " << methodName <<
" not found."
106 " Did you run TMVACrossValidation with a specified"
107 " splitExpr?" << std::endl;
114 tree->Branch(
"x", &
x,
"x/F");
115 tree->Branch(
"y", &
y,
"y/F");
116 tree->Branch(
"eventID", &eventID,
"eventID/I");
118 fillTree(tree, 1000, 1.0, 1.0, 100);
119 fillTree(tree, 1000, -1.0, 1.0, 101);
120 tree->SetBranchAddress(
"x", &
x);
121 tree->SetBranchAddress(
"y", &
y);
122 tree->SetBranchAddress(
"eventID", &eventID);
126 TH1F histBDTG{
"BDTG",
"BDTG", nbin, -1, 1};
127 TH1F histFisher{
"Fisher",
"Fisher", nbin, -1, 1};
130 for (
Long64_t ievt = 0; ievt <
tree->GetEntries(); ievt++) {
131 tree->GetEntry(ievt);
136 histBDTG.Fill(valBDTG);
137 histFisher.Fill(valFisher);
140 tree->ResetBranchAddresses();
143 if (!
gROOT->IsBatch()) {
147 histBDTG.DrawClone();
149 histFisher.DrawClone();
169int main(
int argc,
char **argv)
171 TMVACrossValidationApplication();
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 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 Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
R__EXTERN TSystem * gSystem
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
1-D histogram with a float per channel (see TH1 documentation)
The Reader class serves to use the MVAs in a specific analysis context.
Double_t EvaluateMVA(const std::vector< Float_t > &, const TString &methodTag, Double_t aux=0)
Evaluate a std::vector<float> of input data for a given method The parameter aux is obligatory for th...
IMethod * BookMVA(const TString &methodTag, const TString &weightfile)
read method name from weight file
void AddSpectator(const TString &expression, Float_t *)
Add a float spectator or expression to the reader.
void AddVariable(const TString &expression, Float_t *)
Add a float variable or expression to the reader.
Random number generator class based on M.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
A TTree represents a columnar dataset.