Logo ROOT   6.08/07
Reference Guide
HyperParameterOptimisation.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Omar Zapata, Thomas James Stevenson.
3 
4 
5 #ifndef ROOT_TMVA_HyperParameterOptimisation
6 #define ROOT_TMVA_HyperParameterOptimisation
7 
8 
9 #ifndef ROOT_TString
10 #include "TString.h"
11 #endif
12 
13 #ifndef ROOT_TMultiGraph
14 #include "TMultiGraph.h"
15 #endif
16 
17 #ifndef ROOT_TMVA_IMethod
18 #include "TMVA/IMethod.h"
19 #endif
20 #ifndef ROOT_TMVA_Configurable
21 #include "TMVA/Configurable.h"
22 #endif
23 #ifndef ROOT_TMVA_Types
24 #include "TMVA/Types.h"
25 #endif
26 #ifndef ROOT_TMVA_DataSet
27 #include "TMVA/DataSet.h"
28 #endif
29 #ifndef ROOT_TMVA_Event
30 #include "TMVA/Event.h"
31 #endif
32 #ifndef ROOT_TMVA_Results
33 #include<TMVA/Results.h>
34 #endif
35 
36 #ifndef ROOT_TMVA_Factory
37 #include<TMVA/Factory.h>
38 #endif
39 
40 #ifndef ROOT_TMVA_DataLoader
41 #include<TMVA/DataLoader.h>
42 #endif
43 
44 #ifndef ROOT_TMVA_Envelope
45 #include<TMVA/Envelope.h>
46 #endif
47 
48 namespace TMVA {
49 
51  {
53  private:
54  std::vector<Float_t> fROCs;
56  std::shared_ptr<TMultiGraph> fROCCurves;
57 
58  std::vector<Double_t> fSigs;
59  std::vector<Double_t> fSeps;
60  std::vector<Double_t> fEff01s;
61  std::vector<Double_t> fEff10s;
62  std::vector<Double_t> fEff30s;
63  std::vector<Double_t> fEffAreas;
64  std::vector<Double_t> fTrainEff01s;
65  std::vector<Double_t> fTrainEff10s;
66  std::vector<Double_t> fTrainEff30s;
68 
69  public:
72 
73  std::vector<std::map<TString,Double_t> > fFoldParameters;
74 
75  std::vector<Float_t> GetROCValues(){return fROCs;}
78 
79  void Print() const ;
80 // TCanvas* Draw(const TString name="HyperParameterOptimisation") const;
81 
82  std::vector<Double_t> GetSigValues(){return fSigs;}
83  std::vector<Double_t> GetSepValues(){return fSeps;}
84  std::vector<Double_t> GetEff01Values(){return fEff01s;}
85  std::vector<Double_t> GetEff10Values(){return fEff10s;}
86  std::vector<Double_t> GetEff30Values(){return fEff30s;}
87  std::vector<Double_t> GetEffAreaValues(){return fEffAreas;}
88  std::vector<Double_t> GetTrainEff01Values(){return fTrainEff01s;}
89  std::vector<Double_t> GetTrainEff10Values(){return fTrainEff10s;}
90  std::vector<Double_t> GetTrainEff30Values(){return fTrainEff30s;}
91 
92  };
93 
95  public:
96 
99 
100  void SetFitter(TString fitType){fFitType=fitType;}
101  TString GetFiiter(){return fFitType;}
102 
103 
104  //Figure of Merit (FOM) default Separation
105  void SetFOMType(TString ftype){fFomType=ftype;}
106  TString GetFOMType(){return fFitType;}
107 
108  void SetNumFolds(UInt_t folds);
109  UInt_t GetNumFolds(){return fNumFolds;}
110 
111  virtual void Evaluate();
112  const HyperParameterOptimisationResult& GetResults() const {return fResults;}
113 
114 
115  private:
121  std::unique_ptr<Factory> fClassifier; //!
122 
123  public:
125  };
126 }
127 
128 
129 #endif
130 
131 
132 
float Float_t
Definition: RtypesCore.h:53
A TMultiGraph is a collection of TGraph (or derived) objects.
Definition: TMultiGraph.h:37
Basic string class.
Definition: TString.h:137
bool Bool_t
Definition: RtypesCore.h:59
HyperParameterOptimisationResult fResults
#define ClassDef(name, id)
Definition: Rtypes.h:254
Base class for all machine learning algorithms.
Definition: Envelope.h:55
const HyperParameterOptimisationResult & GetResults() const
unsigned int UInt_t
Definition: RtypesCore.h:42
std::vector< std::map< TString, Double_t > > fFoldParameters
Abstract ClassifierFactory template that handles arbitrary types.
TMultiGraph * GetROCCurves(Bool_t fLegend=kTRUE)
const Bool_t kTRUE
Definition: Rtypes.h:91