48 for (
Int_t n = 0;
n < nPoints; ++
n) {
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;
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);
126 TH1F histBDTG{
"BDTG",
"BDTG", nbin, -1, 1};
127 TH1F histFisher{
"Fisher",
"Fisher", nbin, -1, 1};
136 histBDTG.
Fill(valBDTG);
137 histFisher.
Fill(valFisher);
143 if (!
gROOT->IsBatch()) {
169int main(
int argc,
char **argv)
171 TMVACrossValidationApplication();
bool Bool_t
Boolean (0=false, 1=true) (bool).
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
float Float_t
Float 4 bytes (float).
double Double_t
Double 8 bytes.
long long Long64_t
Portable signed long integer 8 bytes.
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
1-D histogram with a float per channel (see TH1 documentation)
virtual Int_t Fill(Double_t x)
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.
virtual TObject * DrawClone(Option_t *option="") const
Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
Random number generator class based on M.
A TTree represents a columnar dataset.
virtual Int_t Fill()
Fill all branches.
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr, TClass *realClass, EDataType datatype, bool isptr, bool suppressMissingBranchError)
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
virtual Long64_t GetEntries() const
TBranch * Branch(const char *name, T *obj, Int_t bufsize=32000, Int_t splitlevel=99)
Add a new branch, and infer the data type from the type of obj being passed.
virtual void ResetBranchAddresses()
Tell all of our branches to drop their current objects and allocate new ones.