Logo ROOT   6.12/07
Reference Guide
Classification.cxx
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Omar Zapata, Andreas Hoecker, Peter Speckmayer, Joerg Stelzer, Helge Voss, Kai Voss, Eckhard von Toerne, Jan
3 // Therhaag
4 
5 #include <TMVA/Classification.h>
6 
8 #include <TMVA/Config.h>
9 #include <TMVA/Configurable.h>
10 #include <TMVA/Tools.h>
11 #include <TMVA/Ranking.h>
12 #include <TMVA/DataSet.h>
13 #include <TMVA/IMethod.h>
14 #include <TMVA/MethodBase.h>
15 #include <TMVA/DataInputHandler.h>
16 #include <TMVA/DataSetManager.h>
17 #include <TMVA/DataSetInfo.h>
18 #include <TMVA/DataLoader.h>
19 #include <TMVA/MethodBoost.h>
20 #include <TMVA/MethodCategory.h>
21 #include <TMVA/ROCCalc.h>
22 #include <TMVA/ROCCurve.h>
23 #include <TMVA/MsgLogger.h>
24 
25 #include <TMVA/VariableInfo.h>
26 #include <TMVA/VariableTransform.h>
27 
28 #include <TMVA/Types.h>
29 
30 #include <TROOT.h>
31 #include <TFile.h>
32 #include <TTree.h>
33 #include <TLeaf.h>
34 #include <TEventList.h>
35 #include <TH2.h>
36 #include <TText.h>
37 #include <TLegend.h>
38 #include <TGraph.h>
39 #include <TStyle.h>
40 #include <TMatrixF.h>
41 #include <TMatrixDSym.h>
42 #include <TMultiGraph.h>
43 #include <TPaletteAxis.h>
44 #include <TPrincipal.h>
45 #include <TMath.h>
46 #include <TObjString.h>
47 #include <TSystem.h>
48 #include <TCanvas.h>
49 
50 #include <iostream>
51 #include <memory>
52 
53 #define MinNoTrainingEvents 10
54 
55 //_______________________________________________________________________
57 {
58 }
59 
60 //_______________________________________________________________________
62 {
63  fMethod = cr.fMethod;
65  fMvaTrain = cr.fMvaTrain;
66  fMvaTest = cr.fMvaTest;
67 }
68 
69 //_______________________________________________________________________
71 {
72  auto roc = GetROC(iClass, type);
73  auto inte = roc->GetROCIntegral();
74  delete roc;
75  return inte;
76 }
77 
78 //_______________________________________________________________________
80 {
81  ROCCurve *fROCCurve = nullptr;
82  if (type == TMVA::Types::kTesting)
83  fROCCurve = new ROCCurve(fMvaTest[iClass]);
84  else
85  fROCCurve = new ROCCurve(fMvaTrain[iClass]);
86  return fROCCurve;
87 }
88 
89 //_______________________________________________________________________
92 {
93  fMethod = cr.fMethod;
96  fMvaTrain = cr.fMvaTrain;
97  fMvaTest = cr.fMvaTest;
98  return *this;
99 }
100 
101 //_______________________________________________________________________
103 {
104  MsgLogger fLogger("Classification");
107  TString hLine = "--------------------------------------------------- :";
108 
109  fLogger << kINFO << hLine << Endl;
110  fLogger << kINFO << "DataSet MVA :" << Endl;
111  fLogger << kINFO << "Name: Method/Title: ROC-integ :" << Endl;
112  fLogger << kINFO << hLine << Endl;
113  fLogger << kINFO << Form("%-20s %-15s %#1.3f :", fDataLoaderName.Data(),
114  Form("%s/%s", fMethod.GetValue<TString>("MethodName").Data(),
115  fMethod.GetValue<TString>("MethodTitle").Data()),
116  GetROCIntegral())
117  << Endl;
118  fLogger << kINFO << hLine << Endl;
119 
121 }
122 
123 //_______________________________________________________________________
125 {
126  TGraph *roc = GetROC(iClass, type)->GetROCCurve();
127  roc->SetName(Form("%s/%s", GetMethodName().Data(), GetMethodTitle().Data()));
128  roc->SetTitle(Form("%s/%s", GetMethodName().Data(), GetMethodTitle().Data()));
129  roc->GetXaxis()->SetTitle(" Signal Efficiency ");
130  roc->GetYaxis()->SetTitle(" Background Rejection ");
131  return roc;
132 }
133 
134 //_______________________________________________________________________
136 {
137  return fMethod.GetValue<TString>("MethodName") == methodname &&
138  fMethod.GetValue<TString>("MethodTitle") == methodtitle
139  ? kTRUE
140  : kFALSE;
141 }
142 
143 //_______________________________________________________________________
145  : TMVA::Envelope("Classification", dataloader, file, options), fAnalysisType(Types::kClassification),
146  fCorrelations(kFALSE), fROC(kTRUE)
147 {
148  DeclareOptionRef(fCorrelations, "Correlations", "boolean to show correlation in output");
149  DeclareOptionRef(fROC, "ROC", "boolean to show ROC in output");
150  ParseOptions();
152 
153  if (fModelPersistence)
154  gSystem->MakeDirectory(fDataLoader->GetName()); // creating directory for DataLoader output
155 }
156 
157 //_______________________________________________________________________
159  : TMVA::Envelope("Classification", dataloader, NULL, options), fAnalysisType(Types::kClassification),
161 {
162 
163  // init configurable
164  SetConfigDescription("Configuration options for Classification running");
166 
167  DeclareOptionRef(fCorrelations, "Correlations", "boolean to show correlation in output");
168  DeclareOptionRef(fROC, "ROC", "boolean to show ROC in output");
169  ParseOptions();
171  if (fModelPersistence)
172  gSystem->MakeDirectory(fDataLoader->GetName()); // creating directory for DataLoader output
174 }
175 
176 //_______________________________________________________________________
178 {
179  for (auto m : fIMethods) {
180  if (m != NULL)
181  delete m;
182  }
183 }
184 
185 //_______________________________________________________________________
187 {
188  for (auto &meth : fMethods) {
189  if (meth.GetValue<TString>("MethodName") == methodname && meth.GetValue<TString>("MethodTitle") == methodtitle)
190  return meth.GetValue<TString>("MethodOptions");
191  }
192  return "";
193 }
194 
195 //_______________________________________________________________________
197 {
198  fTimer.Reset();
199  fTimer.Start();
200 
201  Bool_t roc = fROC;
202  fROC = kFALSE;
203  if (fJobs <= 1) {
204  Train();
205  Test();
206  } else {
207  for (auto &meth : fMethods) {
208  GetMethod(meth.GetValue<TString>("MethodName"), meth.GetValue<TString>("MethodTitle"));
209  }
211  auto executor = [=](UInt_t workerID) -> ClassificationResult {
216  auto methodname = fMethods[workerID].GetValue<TString>("MethodName");
217  auto methodtitle = fMethods[workerID].GetValue<TString>("MethodTitle");
218  TrainMethod(methodname, methodtitle);
219  TestMethod(methodname, methodtitle);
220  return GetResults(methodname, methodtitle);
221  };
222 
223  fResults = fWorkers.Map(executor, ROOT::TSeqI(fMethods.size()));
224  }
225 
226  fROC = roc;
228 
229  TString hLine = "--------------------------------------------------- :";
230  Log() << kINFO << hLine << Endl;
231  Log() << kINFO << "DataSet MVA :" << Endl;
232  Log() << kINFO << "Name: Method/Title: ROC-integ :" << Endl;
233  Log() << kINFO << hLine << Endl;
234  for (auto &r : fResults) {
235 
236  Log() << kINFO << Form("%-20s %-15s %#1.3f :", r.GetDataLoaderName().Data(),
237  Form("%s/%s", r.GetMethodName().Data(), r.GetMethodTitle().Data()), r.GetROCIntegral())
238  << Endl;
239  }
240  Log() << kINFO << hLine << Endl;
241 
242  Log() << kINFO << "-----------------------------------------------------" << Endl;
243  Log() << kHEADER << "Evaluation done." << Endl << Endl;
244  Log() << kINFO << Form("Jobs = %d Real Time = %lf ", fJobs, fTimer.RealTime()) << Endl;
245  Log() << kINFO << "-----------------------------------------------------" << Endl;
246  Log() << kINFO << "Evaluation done." << Endl;
248 }
249 
250 //_______________________________________________________________________
252 {
253  for (auto &meth : fMethods) {
254  TrainMethod(meth.GetValue<TString>("MethodName"), meth.GetValue<TString>("MethodTitle"));
255  }
256 }
257 
258 //_______________________________________________________________________
260 {
261  auto method = GetMethod(methodname, methodtitle);
262  if (!method) {
263  Log() << kFATAL
264  << Form("Trying to train method %s %s that maybe is not booked.", methodname.Data(), methodtitle.Data())
265  << Endl;
266  }
267  Log() << kHEADER << gTools().Color("bold") << Form("Training method %s %s", methodname.Data(), methodtitle.Data())
268  << gTools().Color("reset") << Endl;
269 
272  method->DataInfo().GetNClasses() < 2)
273  Log() << kFATAL << "You want to do classification training, but specified less than two classes." << Endl;
274 
275  // first print some information about the default dataset
276  // if(!IsSilentFile()) WriteDataInformation(method->fDataSetInfo);
277 
278  if (method->Data()->GetNTrainingEvents() < MinNoTrainingEvents) {
279  Log() << kWARNING << "Method " << method->GetMethodName() << " not trained (training tree has less entries ["
280  << method->Data()->GetNTrainingEvents() << "] than required [" << MinNoTrainingEvents << "]" << Endl;
281  return;
282  }
283 
284  Log() << kHEADER << "Train method: " << method->GetMethodName() << " for Classification" << Endl << Endl;
285  method->TrainMethod();
286  Log() << kHEADER << "Training finished" << Endl << Endl;
287 }
288 
289 //_______________________________________________________________________
291 {
292  TrainMethod(Types::Instance().GetMethodName(method), methodtitle);
293 }
294 
295 //_______________________________________________________________________
297 {
298 
299  if (!HasMethod(methodname, methodtitle)) {
300  std::cout << methodname << " " << methodtitle << std::endl;
301  Log() << kERROR << "Trying to get method not booked." << Endl;
302  return 0;
303  }
304  Int_t index = -1;
305  if (HasMethodObject(methodname, methodtitle, index)) {
306  return dynamic_cast<MethodBase *>(fIMethods[index]);
307  }
308  // if is not created then lets to create it.
310  1) { // 0 entries --> 0 events, 1 entry --> dynamical dataset (or one entry)
311  Log() << kFATAL << "No input data for the training provided!" << Endl;
312  }
313  Log() << kHEADER << "Loading booked method: " << gTools().Color("bold") << methodname << " " << methodtitle
314  << gTools().Color("reset") << Endl << Endl;
315 
316  TString moptions = GetMethodOptions(methodname, methodtitle);
317 
318  // interpret option string with respect to a request for boosting (i.e., BostNum > 0)
319  Int_t boostNum = 0;
320  auto conf = new TMVA::Configurable(moptions);
321  conf->DeclareOptionRef(boostNum = 0, "Boost_num", "Number of times the classifier will be boosted");
322  conf->ParseOptions();
323  delete conf;
324 
325  TString fFileDir;
326  if (fModelPersistence) {
327  fFileDir = fDataLoader->GetName();
328  fFileDir += "/" + gConfig().GetIONames().fWeightFileDir;
329  }
330 
331  // initialize methods
332  IMethod *im;
333  TString fJobName = GetName();
334  if (!boostNum) {
335  im = ClassifierFactory::Instance().Create(std::string(methodname.Data()), fJobName, methodtitle,
336  GetDataLoaderDataSetInfo(), moptions);
337  } else {
338  // boosted classifier, requires a specific definition, making it transparent for the user
339  Log() << kDEBUG << "Boost Number is " << boostNum << " > 0: train boosted classifier" << Endl;
340  im = ClassifierFactory::Instance().Create(std::string("Boost"), fJobName, methodtitle, GetDataLoaderDataSetInfo(),
341  moptions);
342  MethodBoost *methBoost = dynamic_cast<MethodBoost *>(im);
343  if (!methBoost)
344  Log() << kFATAL << "Method with type kBoost cannot be casted to MethodCategory. /Classification" << Endl;
345 
346  if (fModelPersistence)
347  methBoost->SetWeightFileDir(fFileDir);
349  methBoost->SetBoostedMethodName(methodname);
351  methBoost->SetFile(fFile.get());
352  methBoost->SetSilentFile(IsSilentFile());
353  }
354 
355  MethodBase *method = dynamic_cast<MethodBase *>(im);
356  if (method == 0)
357  return 0; // could not create method
358 
359  // set fDataSetManager if MethodCategory (to enable Category to create datasetinfo objects)
360  if (method->GetMethodType() == Types::kCategory) {
361  MethodCategory *methCat = (dynamic_cast<MethodCategory *>(im));
362  if (!methCat)
363  Log() << kFATAL << "Method with type kCategory cannot be casted to MethodCategory. /Classification" << Endl;
364 
365  if (fModelPersistence)
366  methCat->SetWeightFileDir(fFileDir);
369  methCat->SetFile(fFile.get());
370  methCat->SetSilentFile(IsSilentFile());
371  }
372 
373  if (!method->HasAnalysisType(fAnalysisType, GetDataLoaderDataSetInfo().GetNClasses(),
374  GetDataLoaderDataSetInfo().GetNTargets())) {
375  Log() << kWARNING << "Method " << method->GetMethodTypeName() << " is not capable of handling ";
376  Log() << "classification with " << GetDataLoaderDataSetInfo().GetNClasses() << " classes." << Endl;
377  return 0;
378  }
379 
380  if (fModelPersistence)
381  method->SetWeightFileDir(fFileDir);
384  method->SetupMethod();
385  method->ParseOptions();
386  method->ProcessSetup();
387  method->SetFile(fFile.get());
388  method->SetSilentFile(IsSilentFile());
389 
390  // check-for-unused-options is performed; may be overridden by derived classes
391  method->CheckSetup();
392  fIMethods.push_back(method);
393  return method;
394 }
395 
396 //_______________________________________________________________________
398 {
399  if (fIMethods.empty())
400  return kFALSE;
401  for (UInt_t i = 0; i < fIMethods.size(); i++) {
402  // they put method title like method name in MethodBase and type is type name
403  auto methbase = dynamic_cast<MethodBase *>(fIMethods[i]);
404  if (methbase->GetMethodTypeName() == methodname && methbase->GetMethodName() == methodtitle) {
405  index = i;
406  return kTRUE;
407  }
408  }
409  return kFALSE;
410 }
411 
412 //_______________________________________________________________________
414 {
415  for (auto &meth : fMethods) {
416  TestMethod(meth.GetValue<TString>("MethodName"), meth.GetValue<TString>("MethodTitle"));
417  }
418 }
419 
420 //_______________________________________________________________________
422 {
423  auto method = GetMethod(methodname, methodtitle);
424  if (!method) {
425  Log() << kFATAL
426  << Form("Trying to train method %s %s that maybe is not booked.", methodname.Data(), methodtitle.Data())
427  << Endl;
428  }
429 
430  Log() << kHEADER << gTools().Color("bold") << "Test all methods" << gTools().Color("reset") << Endl;
432 
433  Types::EAnalysisType analysisType = method->GetAnalysisType();
434  Log() << kHEADER << "Test method: " << method->GetMethodName() << " for Classification"
435  << " performance" << Endl << Endl;
436  method->AddOutput(Types::kTesting, analysisType);
437 
438  // -----------------------------------------------------------------------
439  // First part of evaluation process
440  // --> compute efficiencies, and other separation estimators
441  // -----------------------------------------------------------------------
442 
443  // although equal, we now want to separate the output for the variables
444  // and the real methods
445  Int_t isel; // will be 0 for a Method; 1 for a Variable
446  Int_t nmeth_used[2] = {0, 0}; // 0 Method; 1 Variable
447 
448  std::vector<std::vector<TString>> mname(2);
449  std::vector<std::vector<Double_t>> sig(2), sep(2), roc(2);
450  std::vector<std::vector<Double_t>> eff01(2), eff10(2), eff30(2), effArea(2);
451  std::vector<std::vector<Double_t>> eff01err(2), eff10err(2), eff30err(2);
452  std::vector<std::vector<Double_t>> trainEff01(2), trainEff10(2), trainEff30(2);
453 
454  method->SetFile(fFile.get());
455  method->SetSilentFile(IsSilentFile());
456 
457  MethodBase *methodNoCuts = NULL;
458  if (!IsCutsMethod(method))
459  methodNoCuts = method;
460 
461  Log() << kHEADER << "Evaluate classifier: " << method->GetMethodName() << Endl << Endl;
462  isel = (method->GetMethodTypeName().Contains("Variable")) ? 1 : 0;
463 
464  // perform the evaluation
465  method->TestClassification();
466 
467  // evaluate the classifier
468  mname[isel].push_back(method->GetMethodName());
469  sig[isel].push_back(method->GetSignificance());
470  sep[isel].push_back(method->GetSeparation());
471  roc[isel].push_back(method->GetROCIntegral());
472 
473  Double_t err;
474  eff01[isel].push_back(method->GetEfficiency("Efficiency:0.01", Types::kTesting, err));
475  eff01err[isel].push_back(err);
476  eff10[isel].push_back(method->GetEfficiency("Efficiency:0.10", Types::kTesting, err));
477  eff10err[isel].push_back(err);
478  eff30[isel].push_back(method->GetEfficiency("Efficiency:0.30", Types::kTesting, err));
479  eff30err[isel].push_back(err);
480  effArea[isel].push_back(method->GetEfficiency("", Types::kTesting, err)); // computes the area (average)
481 
482  trainEff01[isel].push_back(method->GetTrainingEfficiency("Efficiency:0.01")); // the first pass takes longer
483  trainEff10[isel].push_back(method->GetTrainingEfficiency("Efficiency:0.10"));
484  trainEff30[isel].push_back(method->GetTrainingEfficiency("Efficiency:0.30"));
485 
486  nmeth_used[isel]++;
487 
488  if (!IsSilentFile()) {
489  Log() << kDEBUG << "\tWrite evaluation histograms to file" << Endl;
490  method->WriteEvaluationHistosToFile(Types::kTesting);
491  method->WriteEvaluationHistosToFile(Types::kTraining);
492  }
493 
494  // now sort the variables according to the best 'eff at Beff=0.10'
495  for (Int_t k = 0; k < 2; k++) {
496  std::vector<std::vector<Double_t>> vtemp;
497  vtemp.push_back(effArea[k]); // this is the vector that is ranked
498  vtemp.push_back(eff10[k]);
499  vtemp.push_back(eff01[k]);
500  vtemp.push_back(eff30[k]);
501  vtemp.push_back(eff10err[k]);
502  vtemp.push_back(eff01err[k]);
503  vtemp.push_back(eff30err[k]);
504  vtemp.push_back(trainEff10[k]);
505  vtemp.push_back(trainEff01[k]);
506  vtemp.push_back(trainEff30[k]);
507  vtemp.push_back(sig[k]);
508  vtemp.push_back(sep[k]);
509  vtemp.push_back(roc[k]);
510  std::vector<TString> vtemps = mname[k];
511  gTools().UsefulSortDescending(vtemp, &vtemps);
512  effArea[k] = vtemp[0];
513  eff10[k] = vtemp[1];
514  eff01[k] = vtemp[2];
515  eff30[k] = vtemp[3];
516  eff10err[k] = vtemp[4];
517  eff01err[k] = vtemp[5];
518  eff30err[k] = vtemp[6];
519  trainEff10[k] = vtemp[7];
520  trainEff01[k] = vtemp[8];
521  trainEff30[k] = vtemp[9];
522  sig[k] = vtemp[10];
523  sep[k] = vtemp[11];
524  roc[k] = vtemp[12];
525  mname[k] = vtemps;
526  }
527 
528  // -----------------------------------------------------------------------
529  // Second part of evaluation process
530  // --> compute correlations among MVAs
531  // --> compute correlations between input variables and MVA (determines importance)
532  // --> count overlaps
533  // -----------------------------------------------------------------------
534  if (fCorrelations) {
535  const Int_t nmeth = methodNoCuts == NULL ? 0 : 1;
536  const Int_t nvar = method->fDataSetInfo.GetNVariables();
537  if (nmeth > 0) {
538 
539  // needed for correlations
540  Double_t *dvec = new Double_t[nmeth + nvar];
541  std::vector<Double_t> rvec;
542 
543  // for correlations
544  TPrincipal *tpSig = new TPrincipal(nmeth + nvar, "");
545  TPrincipal *tpBkg = new TPrincipal(nmeth + nvar, "");
546 
547  // set required tree branch references
548  std::vector<TString> *theVars = new std::vector<TString>;
549  std::vector<ResultsClassification *> mvaRes;
550  theVars->push_back(methodNoCuts->GetTestvarName());
551  rvec.push_back(methodNoCuts->GetSignalReferenceCut());
552  theVars->back().ReplaceAll("MVA_", "");
553  mvaRes.push_back(dynamic_cast<ResultsClassification *>(
554  methodNoCuts->Data()->GetResults(methodNoCuts->GetMethodName(), Types::kTesting, Types::kMaxAnalysisType)));
555 
556  // for overlap study
557  TMatrixD *overlapS = new TMatrixD(nmeth, nmeth);
558  TMatrixD *overlapB = new TMatrixD(nmeth, nmeth);
559  (*overlapS) *= 0; // init...
560  (*overlapB) *= 0; // init...
561 
562  // loop over test tree
563  DataSet *defDs = method->fDataSetInfo.GetDataSet();
565  for (Int_t ievt = 0; ievt < defDs->GetNEvents(); ievt++) {
566  const Event *ev = defDs->GetEvent(ievt);
567 
568  // for correlations
569  TMatrixD *theMat = 0;
570  for (Int_t im = 0; im < nmeth; im++) {
571  // check for NaN value
572  Double_t retval = (Double_t)(*mvaRes[im])[ievt][0];
573  if (TMath::IsNaN(retval)) {
574  Log() << kWARNING << "Found NaN return value in event: " << ievt << " for method \""
575  << methodNoCuts->GetName() << "\"" << Endl;
576  dvec[im] = 0;
577  } else
578  dvec[im] = retval;
579  }
580  for (Int_t iv = 0; iv < nvar; iv++)
581  dvec[iv + nmeth] = (Double_t)ev->GetValue(iv);
582  if (method->fDataSetInfo.IsSignal(ev)) {
583  tpSig->AddRow(dvec);
584  theMat = overlapS;
585  } else {
586  tpBkg->AddRow(dvec);
587  theMat = overlapB;
588  }
589 
590  // count overlaps
591  for (Int_t im = 0; im < nmeth; im++) {
592  for (Int_t jm = im; jm < nmeth; jm++) {
593  if ((dvec[im] - rvec[im]) * (dvec[jm] - rvec[jm]) > 0) {
594  (*theMat)(im, jm)++;
595  if (im != jm)
596  (*theMat)(jm, im)++;
597  }
598  }
599  }
600  }
601 
602  // renormalise overlap matrix
603  (*overlapS) *= (1.0 / defDs->GetNEvtSigTest()); // init...
604  (*overlapB) *= (1.0 / defDs->GetNEvtBkgdTest()); // init...
605 
606  tpSig->MakePrincipals();
607  tpBkg->MakePrincipals();
608 
609  const TMatrixD *covMatS = tpSig->GetCovarianceMatrix();
610  const TMatrixD *covMatB = tpBkg->GetCovarianceMatrix();
611 
612  const TMatrixD *corrMatS = gTools().GetCorrelationMatrix(covMatS);
613  const TMatrixD *corrMatB = gTools().GetCorrelationMatrix(covMatB);
614 
615  // print correlation matrices
616  if (corrMatS != 0 && corrMatB != 0) {
617 
618  // extract MVA matrix
619  TMatrixD mvaMatS(nmeth, nmeth);
620  TMatrixD mvaMatB(nmeth, nmeth);
621  for (Int_t im = 0; im < nmeth; im++) {
622  for (Int_t jm = 0; jm < nmeth; jm++) {
623  mvaMatS(im, jm) = (*corrMatS)(im, jm);
624  mvaMatB(im, jm) = (*corrMatB)(im, jm);
625  }
626  }
627 
628  // extract variables - to MVA matrix
629  std::vector<TString> theInputVars;
630  TMatrixD varmvaMatS(nvar, nmeth);
631  TMatrixD varmvaMatB(nvar, nmeth);
632  for (Int_t iv = 0; iv < nvar; iv++) {
633  theInputVars.push_back(method->fDataSetInfo.GetVariableInfo(iv).GetLabel());
634  for (Int_t jm = 0; jm < nmeth; jm++) {
635  varmvaMatS(iv, jm) = (*corrMatS)(nmeth + iv, jm);
636  varmvaMatB(iv, jm) = (*corrMatB)(nmeth + iv, jm);
637  }
638  }
639 
640  if (nmeth > 1) {
641  Log() << kINFO << Endl;
642  Log() << kINFO << Form("Dataset[%s] : ", method->fDataSetInfo.GetName())
643  << "Inter-MVA correlation matrix (signal):" << Endl;
644  gTools().FormattedOutput(mvaMatS, *theVars, Log());
645  Log() << kINFO << Endl;
646 
647  Log() << kINFO << Form("Dataset[%s] : ", method->fDataSetInfo.GetName())
648  << "Inter-MVA correlation matrix (background):" << Endl;
649  gTools().FormattedOutput(mvaMatB, *theVars, Log());
650  Log() << kINFO << Endl;
651  }
652 
653  Log() << kINFO << Form("Dataset[%s] : ", method->fDataSetInfo.GetName())
654  << "Correlations between input variables and MVA response (signal):" << Endl;
655  gTools().FormattedOutput(varmvaMatS, theInputVars, *theVars, Log());
656  Log() << kINFO << Endl;
657 
658  Log() << kINFO << Form("Dataset[%s] : ", method->fDataSetInfo.GetName())
659  << "Correlations between input variables and MVA response (background):" << Endl;
660  gTools().FormattedOutput(varmvaMatB, theInputVars, *theVars, Log());
661  Log() << kINFO << Endl;
662  } else
663  Log() << kWARNING << Form("Dataset[%s] : ", method->fDataSetInfo.GetName())
664  << "<TestAllMethods> cannot compute correlation matrices" << Endl;
665 
666  // print overlap matrices
667  Log() << kINFO << Form("Dataset[%s] : ", method->fDataSetInfo.GetName())
668  << "The following \"overlap\" matrices contain the fraction of events for which " << Endl;
669  Log() << kINFO << Form("Dataset[%s] : ", method->fDataSetInfo.GetName())
670  << "the MVAs 'i' and 'j' have returned conform answers about \"signal-likeness\"" << Endl;
671  Log() << kINFO << Form("Dataset[%s] : ", method->fDataSetInfo.GetName())
672  << "An event is signal-like, if its MVA output exceeds the following value:" << Endl;
673  gTools().FormattedOutput(rvec, *theVars, "Method", "Cut value", Log());
674  Log() << kINFO << Form("Dataset[%s] : ", method->fDataSetInfo.GetName())
675  << "which correspond to the working point: eff(signal) = 1 - eff(background)" << Endl;
676 
677  // give notice that cut method has been excluded from this test
678  if (nmeth != 1)
679  Log() << kINFO << Form("Dataset[%s] : ", method->fDataSetInfo.GetName())
680  << "Note: no correlations and overlap with cut method are provided at present" << Endl;
681 
682  if (nmeth > 1) {
683  Log() << kINFO << Endl;
684  Log() << kINFO << Form("Dataset[%s] : ", method->fDataSetInfo.GetName())
685  << "Inter-MVA overlap matrix (signal):" << Endl;
686  gTools().FormattedOutput(*overlapS, *theVars, Log());
687  Log() << kINFO << Endl;
688 
689  Log() << kINFO << Form("Dataset[%s] : ", method->fDataSetInfo.GetName())
690  << "Inter-MVA overlap matrix (background):" << Endl;
691  gTools().FormattedOutput(*overlapB, *theVars, Log());
692  }
693 
694  // cleanup
695  delete tpSig;
696  delete tpBkg;
697  delete corrMatS;
698  delete corrMatB;
699  delete theVars;
700  delete overlapS;
701  delete overlapB;
702  delete[] dvec;
703  }
704  }
705 
706  // -----------------------------------------------------------------------
707  // Third part of evaluation process
708  // --> output
709  // -----------------------------------------------------------------------
710 
711  // Binary classification
712  if (fROC) {
713  Log().EnableOutput();
715  Log() << Endl;
716  TString hLine = "------------------------------------------------------------------------------------------"
717  "-------------------------";
718  Log() << kINFO << "Evaluation results ranked by best signal efficiency and purity (area)" << Endl;
719  Log() << kINFO << hLine << Endl;
720  Log() << kINFO << "DataSet MVA " << Endl;
721  Log() << kINFO << "Name: Method: ROC-integ" << Endl;
722 
723  Log() << kDEBUG << hLine << Endl;
724  for (Int_t k = 0; k < 2; k++) {
725  if (k == 1 && nmeth_used[k] > 0) {
726  Log() << kINFO << hLine << Endl;
727  Log() << kINFO << "Input Variables: " << Endl << hLine << Endl;
728  }
729  for (Int_t i = 0; i < nmeth_used[k]; i++) {
730  TString datasetName = fDataLoader->GetName();
731  TString methodName = mname[k][i];
732 
733  if (k == 1) {
734  methodName.ReplaceAll("Variable_", "");
735  }
736 
737  TMVA::DataSet *dataset = method->Data();
738  TMVA::Results *results = dataset->GetResults(methodName, Types::kTesting, this->fAnalysisType);
739  std::vector<Bool_t> *mvaResType = dynamic_cast<ResultsClassification *>(results)->GetValueVectorTypes();
740 
741  Double_t rocIntegral = 0.0;
742  if (mvaResType->size() != 0) {
743  rocIntegral = GetROCIntegral(methodname, methodtitle);
744  }
745 
746  if (sep[k][i] < 0 || sig[k][i] < 0) {
747  // cannot compute separation/significance -> no MVA (usually for Cuts)
748  Log() << kINFO << Form("%-13s %-15s: %#1.3f", fDataLoader->GetName(), methodName.Data(), effArea[k][i])
749  << Endl;
750  } else {
751  Log() << kINFO << Form("%-13s %-15s: %#1.3f", datasetName.Data(), methodName.Data(), rocIntegral)
752  << Endl;
753  }
754  }
755  }
756  Log() << kINFO << hLine << Endl;
757  Log() << kINFO << Endl;
758  Log() << kINFO << "Testing efficiency compared to training efficiency (overtraining check)" << Endl;
759  Log() << kINFO << hLine << Endl;
760  Log() << kINFO
761  << "DataSet MVA Signal efficiency: from test sample (from training sample) "
762  << Endl;
763  Log() << kINFO << "Name: Method: @B=0.01 @B=0.10 @B=0.30 "
764  << Endl;
765  Log() << kINFO << hLine << Endl;
766  for (Int_t k = 0; k < 2; k++) {
767  if (k == 1 && nmeth_used[k] > 0) {
768  Log() << kINFO << hLine << Endl;
769  Log() << kINFO << "Input Variables: " << Endl << hLine << Endl;
770  }
771  for (Int_t i = 0; i < nmeth_used[k]; i++) {
772  if (k == 1)
773  mname[k][i].ReplaceAll("Variable_", "");
774 
775  Log() << kINFO << Form("%-20s %-15s: %#1.3f (%#1.3f) %#1.3f (%#1.3f) %#1.3f (%#1.3f)",
776  method->fDataSetInfo.GetName(), (const char *)mname[k][i], eff01[k][i],
777  trainEff01[k][i], eff10[k][i], trainEff10[k][i], eff30[k][i], trainEff30[k][i])
778  << Endl;
779  }
780  }
781  Log() << kINFO << hLine << Endl;
782  Log() << kINFO << Endl;
783 
784  if (gTools().CheckForSilentOption(GetOptions()))
785  Log().InhibitOutput();
786  } // end fROC
787 
788  // putting results in the classification result object
789  auto &fResult = GetResults(methodname, methodtitle);
790 
791  TMVA::DataSet *dataset = method->Data();
793 
794  // auto rocCurveTrain = GetROC(methodname, methodtitle, 0, Types::kTraining);
795  auto rocCurveTest = GetROC(methodname, methodtitle, 0, Types::kTesting);
796  // fResult.fMvaTrain[0] = rocCurveTrain->GetMvas();
797  fResult.fMvaTest[0] = rocCurveTest->GetMvas();
798  TString className = method->DataInfo().GetClassInfo(0)->GetName();
799  fResult.fClassNames.push_back(className);
800  // className = method->DataInfo().GetClassInfo(1)->GetName();
801  // fResult.fClassNames.push_back(className);
802 
803  if (!IsSilentFile()) {
804  // write test/training trees
805  RootBaseDir()->cd(method->fDataSetInfo.GetName());
806  method->fDataSetInfo.GetDataSet()->GetTree(Types::kTesting)->Write("", TObject::kOverwrite);
807  method->fDataSetInfo.GetDataSet()->GetTree(Types::kTraining)->Write("", TObject::kOverwrite);
808  }
809 }
810 
811 //_______________________________________________________________________
813 {
814  TestMethod(Types::Instance().GetMethodName(method), methodtitle);
815 }
816 
817 //_______________________________________________________________________
818 std::vector<TMVA::Experimental::ClassificationResult> &TMVA::Experimental::Classification::GetResults()
819 {
820  if (fResults.size() == 0)
821  Log() << kFATAL << "No Classification results available" << Endl;
822  return fResults;
823 }
824 
825 //_______________________________________________________________________
827 {
828  return method->GetMethodType() == Types::kCuts ? kTRUE : kFALSE;
829 }
830 
831 //_______________________________________________________________________
834 {
835  for (auto &result : fResults) {
836  if (result.IsMethod(methodname, methodtitle))
837  return result;
838  }
839  ClassificationResult result;
840  result.fMethod["MethodName"] = methodname;
841  result.fMethod["MethodTitle"] = methodtitle;
842  result.fDataLoaderName = fDataLoader->GetName();
843  fResults.push_back(result);
844  return fResults.back();
845 }
846 
847 //_______________________________________________________________________
850 {
851  TMVA::DataSet *dataset = method->Data();
852  dataset->SetCurrentType(type);
853  TMVA::Results *results = dataset->GetResults(method->GetName(), type, this->fAnalysisType);
854 
855  UInt_t nClasses = method->DataInfo().GetNClasses();
856  if (this->fAnalysisType == Types::kMulticlass && iClass >= nClasses) {
857  Log() << kERROR << Form("Given class number (iClass = %i) does not exist. There are %i classes in dataset.",
858  iClass, nClasses)
859  << Endl;
860  return nullptr;
861  }
862 
863  TMVA::ROCCurve *rocCurve = nullptr;
864  if (this->fAnalysisType == Types::kClassification) {
865 
866  std::vector<Float_t> *mvaRes = dynamic_cast<ResultsClassification *>(results)->GetValueVector();
867  std::vector<Bool_t> *mvaResTypes = dynamic_cast<ResultsClassification *>(results)->GetValueVectorTypes();
868  std::vector<Float_t> mvaResWeights;
869 
870  auto eventCollection = dataset->GetEventCollection(type);
871  mvaResWeights.reserve(eventCollection.size());
872  for (auto ev : eventCollection) {
873  mvaResWeights.push_back(ev->GetWeight());
874  }
875 
876  rocCurve = new TMVA::ROCCurve(*mvaRes, *mvaResTypes, mvaResWeights);
877 
878  } else if (this->fAnalysisType == Types::kMulticlass) {
879  std::vector<Float_t> mvaRes;
880  std::vector<Bool_t> mvaResTypes;
881  std::vector<Float_t> mvaResWeights;
882 
883  std::vector<std::vector<Float_t>> *rawMvaRes = dynamic_cast<ResultsMulticlass *>(results)->GetValueVector();
884 
885  // Vector transpose due to values being stored as
886  // [ [0, 1, 2], [0, 1, 2], ... ]
887  // in ResultsMulticlass::GetValueVector.
888  mvaRes.reserve(rawMvaRes->size());
889  for (auto item : *rawMvaRes) {
890  mvaRes.push_back(item[iClass]);
891  }
892 
893  auto eventCollection = dataset->GetEventCollection(type);
894  mvaResTypes.reserve(eventCollection.size());
895  mvaResWeights.reserve(eventCollection.size());
896  for (auto ev : eventCollection) {
897  mvaResTypes.push_back(ev->GetClass() == iClass);
898  mvaResWeights.push_back(ev->GetWeight());
899  }
900 
901  rocCurve = new TMVA::ROCCurve(mvaRes, mvaResTypes, mvaResWeights);
902  }
903 
904  return rocCurve;
905 }
906 
907 //_______________________________________________________________________
910 {
911  return GetROC(GetMethod(methodname, methodtitle), iClass, type);
912 }
913 
914 //_______________________________________________________________________
916 {
917  TMVA::ROCCurve *rocCurve = GetROC(methodname, methodtitle, iClass);
918  if (!rocCurve) {
919  Log() << kFATAL
920  << Form("ROCCurve object was not created in MethodName = %s MethodTitle = %s not found with Dataset = %s ",
921  methodname.Data(), methodtitle.Data(), fDataLoader->GetName())
922  << Endl;
923  return 0;
924  }
925 
927  Double_t rocIntegral = rocCurve->GetROCIntegral(npoints);
928  delete rocCurve;
929 
930  return rocIntegral;
931 }
std::map< UInt_t, std::vector< std::tuple< Float_t, Float_t, Bool_t > > > fMvaTest
IMethod * Create(const std::string &name, const TString &job, const TString &title, DataSetInfo &dsi, const TString &option)
creates the method if needed based on the method name using the creator function the factory has stor...
static ClassifierFactory & Instance()
access to the ClassifierFactory singleton creates the instance if needed
void SetModelPersistence(Bool_t status)
Definition: MethodBase.h:371
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
Bool_t IsCutsMethod(TMVA::MethodBase *method)
UInt_t GetNVariables() const
Definition: DataSetInfo.h:110
#define MinNoTrainingEvents
TString GetMethodOptions(TString methodname, TString methodtitle)
Principal Components Analysis (PCA)
Definition: TPrincipal.h:20
void UsefulSortDescending(std::vector< std::vector< Double_t > > &, std::vector< TString > *vs=0)
sort 2D vector (AND in parallel a TString vector) in such a way that the "first vector is sorted" and...
Definition: Tools.cxx:575
void SetNWorkers(unsigned n)
Types::EAnalysisType fAnalysisType
vector of objects with booked methods
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
Definition: TStopwatch.cxx:110
MsgLogger & Endl(MsgLogger &ml)
Definition: MsgLogger.h:158
DataSetInfo & GetDataLoaderDataSetInfo()
Utility method to get TMVA::DataSetInfo reference from the DataLoader.
Definition: Envelope.h:102
Singleton class for Global types used by TMVA.
Definition: Types.h:73
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
Definition: TStopwatch.cxx:58
auto * m
Definition: textangle.C:8
Double_t GetROCIntegral(const UInt_t points=41)
Calculates the ROC integral (AUC)
Definition: ROCCurve.cxx:251
T GetValue(const TString &key)
Definition: OptionMap.h:145
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition: TString.h:638
static Types & Instance()
the the single instance of "Types" if existing already, or create it (Singleton)
Definition: Types.cxx:70
Bool_t HasMethodObject(TString methodname, TString methodtitle, Int_t &index)
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
Config & gConfig()
MsgLogger & Log() const
Definition: Configurable.h:122
OptionBase * DeclareOptionRef(T &ref, const TString &name, const TString &desc="")
Double_t GetROCIntegral(UInt_t iClass=0, TMVA::Types::ETreeType type=TMVA::Types::kTesting)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:46
EAnalysisType
Definition: Types.h:125
virtual int MakeDirectory(const char *name)
Make a directory.
Definition: TSystem.cxx:825
TAxis * GetYaxis() const
Get y axis of the graph.
Definition: TGraph.cxx:1602
Virtual base Class for all MVA method.
Definition: MethodBase.h:109
overwrite existing object with same name
Definition: TObject.h:88
MethodBase * GetMethod(TString methodname, TString methodtitle)
Basic string class.
Definition: TString.h:125
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void SetTitle(const char *title="")
Set graph title.
Definition: TGraph.cxx:2208
UInt_t GetNClasses() const
Definition: DataSetInfo.h:136
Bool_t IsNaN(Double_t x)
Definition: TMath.h:777
const std::vector< Event * > & GetEventCollection(Types::ETreeType type=Types::kMaxTreeType) const
Definition: DataSet.h:225
void SetSilentFile(Bool_t status)
Definition: MethodBase.h:367
virtual Bool_t HasAnalysisType(Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets)=0
std::shared_ptr< TFile > fFile
data
Definition: Envelope.h:48
Bool_t IsSilentFile()
Method to see if a file is available to save results.
Definition: Envelope.cxx:68
std::map< UInt_t, std::vector< std::tuple< Float_t, Float_t, Bool_t > > > fMvaTrain
TDirectory * RootBaseDir()
Utility method to get base dir directory from current file.
Definition: Envelope.h:114
Bool_t HasMethod(TString methodname, TString methodtitle)
function to check methods booked
Definition: Envelope.cxx:215
ClassificationResult & operator=(const ClassificationResult &r)
static void InhibitOutput()
Definition: MsgLogger.cxx:74
static void SetIsTraining(Bool_t)
when this static function is called, it sets the flag whether events with negative event weight shoul...
Definition: Event.cxx:392
DataSetInfo & fDataSetInfo
Definition: MethodBase.h:594
DataSet * Data() const
Definition: MethodBase.h:398
TString fWeightFileDir
Definition: Config.h:107
virtual void TrainMethod(TString methodname, TString methodtitle)
IONames & GetIONames()
Definition: Config.h:85
virtual void ParseOptions()
options parser
Abstract base class for all high level ml algorithms, you can book ml methods like BDT...
Definition: Envelope.h:43
void SetupMethod()
setup of methods
Definition: MethodBase.cxx:411
DataSetInfo & DataInfo() const
Definition: MethodBase.h:399
std::vector< IMethod * > fIMethods
void SetDrawProgressBar(Bool_t d)
Definition: Config.h:74
Classification(DataLoader *loader, TFile *file, TString options)
Class for boosting a TMVA method.
Definition: MethodBoost.h:58
TMatrixT< Double_t > TMatrixD
Definition: TMatrixDfwd.h:22
Class that contains all the data information.
Definition: DataSet.h:69
virtual void ParseOptions()
Method to parse the internal option string.
Definition: Envelope.cxx:177
virtual void TestMethod(TString methodname, TString methodtitle)
Results * GetResults(const TString &, Types::ETreeType type, Types::EAnalysisType analysistype)
Definition: DataSet.cxx:265
std::string GetMethodName(TCppMethod_t)
Definition: Cppyy.cxx:733
ROOT::R::TRInterface & r
Definition: Object.C:4
R__EXTERN TSystem * gSystem
Definition: TSystem.h:540
virtual void AddRow(const Double_t *x)
Add a data point and update the covariance matrix.
Definition: TPrincipal.cxx:410
const char * GetName() const
Definition: MethodBase.h:323
Long64_t GetNEvtSigTest()
return number of signal test events in dataset
Definition: DataSet.cxx:398
Double_t GetROCIntegral(TString methodname, TString methodtitle, UInt_t iClass=0)
class TMVA::Config::VariablePlotting fVariablePlotting
unsigned int UInt_t
Definition: RtypesCore.h:42
char * Form(const char *fmt,...)
DataSetManager * fDataSetManager
const TMatrixD * GetCovarianceMatrix() const
Definition: TPrincipal.h:58
const TString & GetMethodName() const
Definition: MethodBase.h:320
Tools & gTools()
virtual void MakePrincipals()
Perform the principal components analysis.
Definition: TPrincipal.cxx:869
void SetBoostedMethodName(TString methodName)
Definition: MethodBoost.h:86
Long64_t GetNEvtBkgdTest()
return number of background test events in dataset
Definition: DataSet.cxx:406
TAxis * GetXaxis() const
Get x axis of the graph.
Definition: TGraph.cxx:1592
const Bool_t kFALSE
Definition: RtypesCore.h:88
Float_t GetValue(UInt_t ivar) const
return value of i&#39;th variable
Definition: Event.cxx:237
Class for categorizing the phase space.
TMVA::ROCCurve * GetROC(TMVA::MethodBase *method, UInt_t iClass=0, TMVA::Types::ETreeType type=TMVA::Types::kTesting)
virtual void CheckSetup()
check may be overridden by derived class (sometimes, eg, fitters are used which can only be implement...
Definition: MethodBase.cxx:438
double Double_t
Definition: RtypesCore.h:55
A pseudo container class which is a generator of indices.
Definition: TSeq.hxx:66
Bool_t fModelPersistence
file to save the results
Definition: Envelope.h:49
const TMatrixD * GetCorrelationMatrix(const TMatrixD *covMat)
turns covariance into correlation matrix
Definition: Tools.cxx:336
int type
Definition: TGX11.cxx:120
std::shared_ptr< DataLoader > fDataLoader
Booked method information.
Definition: Envelope.h:47
Class which takes the results of a multiclass classification.
void SetFile(TFile *file)
Definition: MethodBase.h:364
void SetCurrentType(Types::ETreeType type) const
Definition: DataSet.h:100
UInt_t GetEntries(const TString &name) const
void ProcessSetup()
process all options the "CheckForUnusedOptions" is done in an independent call, since it may be overr...
Definition: MethodBase.cxx:428
ostringstream derivative to redirect and format output
Definition: MsgLogger.h:59
const TString & GetOptions() const
Definition: Configurable.h:84
void FormattedOutput(const std::vector< Double_t > &, const std::vector< TString > &, const TString titleVars, const TString titleValues, MsgLogger &logger, TString format="%+1.3f")
formatted output of simple table
Definition: Tools.cxx:898
const TString & Color(const TString &)
human readable color strings
Definition: Tools.cxx:839
Mother of all ROOT objects.
Definition: TObject.h:37
UInt_t fJobs
procpool object
Definition: Envelope.h:54
void SetUseColor(Bool_t uc)
Definition: Config.h:65
void SetConfigName(const char *n)
Definition: Configurable.h:63
Interface for all concrete MVA method implementations.
Definition: IMethod.h:54
Bool_t IsMethod(TString methodname, TString methodtitle)
Abstract ClassifierFactory template that handles arbitrary types.
TGraph * GetROCCurve(const UInt_t points=100)
Returns a new TGraph containing the ROC curve.
Definition: ROCCurve.cxx:277
DataSetManager * fDataSetManager
Definition: MethodBoost.h:193
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
Definition: TDirectory.cxx:497
auto Map(F func, unsigned nTimes) -> std::vector< typename std::result_of< F()>::type >
Execute func (with no arguments) nTimes in parallel.
TString GetMethodTypeName() const
Definition: MethodBase.h:321
Definition: file.py:1
TGraph * GetROCGraph(UInt_t iClass=0, TMVA::Types::ETreeType type=TMVA::Types::kTesting)
Class that is the base-class for a vector of result.
Definition: Results.h:57
void SetSilent(Bool_t s)
Definition: Config.h:68
void SetWeightFileDir(TString fileDir)
set directory of weight file
Double_t GetSignalReferenceCut() const
Definition: MethodBase.h:349
DataSetManager * GetDataLoaderDataSetManager()
Utility method to get TMVA::DataSetManager pointer from the DataLoader.
Definition: Envelope.h:108
A Graph is a graphics object made of two arrays X and Y with npoints each.
Definition: TGraph.h:41
DataInputHandler & GetDataLoaderDataInput()
Utility method to get TMVA::DataInputHandler reference from the DataLoader.
Definition: Envelope.h:96
Long64_t GetNEvents(Types::ETreeType type=Types::kMaxTreeType) const
Definition: DataSet.h:215
std::vector< ClassificationResult > & GetResults()
void Reset()
Definition: TStopwatch.h:52
virtual void Evaluate()
Virtual method to be implemented with your algorithm.
static void EnableOutput()
Definition: MsgLogger.cxx:75
const TString & GetTestvarName() const
Definition: MethodBase.h:324
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition: TNamed.cxx:164
TStopwatch fTimer
number of jobs to run some high level algorithm in parallel
Definition: Envelope.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:87
std::vector< ClassificationResult > fResults
Types::EMVA GetMethodType() const
Definition: MethodBase.h:322
void CheckForUnusedOptions() const
checks for unused options in option string
const Event * GetEvent() const
Definition: DataSet.cxx:202
std::vector< OptionMap > fMethods
Definition: Envelope.h:46
TProcPool fWorkers
if true dont produce file output
Definition: Envelope.h:53
virtual void SetAnalysisType(Types::EAnalysisType type)
Definition: MethodBase.h:425
Class that is the base-class for a vector of result.
void SetConfigDescription(const char *d)
Definition: Configurable.h:64
ROCCurve * GetROC(UInt_t iClass=0, TMVA::Types::ETreeType type=TMVA::Types::kTesting)
const char * Data() const
Definition: TString.h:345