Logo ROOT  
Reference Guide
Types.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Class : Types *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * GLobal types (singleton class) *
12  * *
13  * Authors (alphabetical): *
14  * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
15  * Peter Speckmayer <Peter.Speckmayer@cern.ch> - CERN, Switzerland *
16  * Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland *
17  * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
18  * *
19  * Copyright (c) 2005: *
20  * CERN, Switzerland *
21  * U. of Victoria, Canada *
22  * MPI-K Heidelberg, Germany *
23  * *
24  * Redistribution and use in source and binary forms, with or without *
25  * modification, are permitted according to the terms listed in LICENSE *
26  * (http://mva.sourceforge.net/license.txt) *
27  **********************************************************************************/
28 
29 #ifndef ROOT_TMVA_Types
30 #define ROOT_TMVA_Types
31 
32 //////////////////////////////////////////////////////////////////////////
33 // //
34 // Types //
35 // //
36 // Singleton class for Global types used by TMVA //
37 // //
38 //////////////////////////////////////////////////////////////////////////
39 
40 #include <map>
41 #if __cplusplus > 199711L
42 #include <atomic>
43 #endif
44 
45 #include "RtypesCore.h"
46 
47 #include "TString.h"
48 
49 namespace TMVA {
50 
51  typedef UInt_t TMVAVersion_t;
52 
53  class MsgLogger;
54 
55  // message types for MsgLogger
56  // define outside of Types class to facilite access
57  enum EMsgType {
58  kDEBUG = 1,
59  kVERBOSE = 2,
60  kINFO = 3,
61  kWARNING = 4,
62  kERROR = 5,
63  kFATAL = 6,
64  kSILENT = 7,
65  kHEADER = 8
66  };
67 
68  enum HistType { kMVAType = 0, kProbaType = 1, kRarityType = 2, kCompareType = 3 };
69 
70  //Variable Importance type
71  enum VIType {kShort=0,kAll=1,kRandom=2};
72 
73  class Types {
74 
75  public:
76 
77  // available MVA methods
78  enum EMVA {
79  kVariable = 0,
80  kCuts ,
81  kLikelihood ,
82  kPDERS ,
83  kHMatrix ,
84  kFisher ,
85  kKNN ,
86  kCFMlpANN ,
87  kTMlpANN ,
88  kBDT ,
89  kDT ,
90  kRuleFit ,
91  kSVM ,
92  kMLP ,
94  kFDA ,
95  kBoost ,
97  kLD ,
98  kPlugins ,
99  kCategory ,
100  kDNN ,
101  kDL ,
112  };
113 
114  // available variable transformations
124  };
125 
126  // type of analysis
133  };
134 
135  enum ESBType {
136  kSignal = 0, // Never change this number - it is elsewhere assumed to be zero !
137  kBackground,
141  };
142 
143  enum ETreeType {
146  kMaxTreeType, // also used as temporary storage for trees not yet assigned for testing;training...
147  kValidation, // these are placeholders... currently not used, but could be moved "forward" if
148  kTrainingOriginal // ever needed
149  };
150 
151  enum EBoostStage {
157  };
158 
159  public:
160 
161  static Types& Instance();
162  static void DestroyInstance();
164 
165  Types::EMVA GetMethodType( const TString& method ) const;
167 
168  Bool_t AddTypeMapping(Types::EMVA method, const TString& methodname);
169 
170  private:
171 
172  Types();
173 #if __cplusplus > 199711L && !defined _MSC_VER
174  static std::atomic<Types*> fgTypesPtr;
175 #else
176  static Types* fgTypesPtr;
177 #endif
178 
179  private:
180 
181  std::map<TString, TMVA::Types::EMVA> fStr2type; // types-to-text map
182  mutable MsgLogger* fLogger; // message logger
183  MsgLogger& Log() const { return *fLogger; }
184 
185  };
186 }
187 
188 #endif
TMVA::Types::kTrueType
@ kTrueType
Definition: Types.h:163
TMVA::Types::Types
Types()
constructor
Definition: Types.cxx:55
TMVA::Types::~Types
~Types()
Definition: Types.cxx:60
TMVA::Types::kMulticlass
@ kMulticlass
Definition: Types.h:153
TMVA::Types::kTMlpANN
@ kTMlpANN
Definition: Types.h:110
TMVA::Types::kCrossValidation
@ kCrossValidation
Definition: Types.h:133
TMVA::Types::kDNN
@ kDNN
Definition: Types.h:123
TMVA::Types::kRegression
@ kRegression
Definition: Types.h:152
TMVA::Types::EBoostStage
EBoostStage
Definition: Types.h:174
TMVA::Types::kDecorrelated
@ kDecorrelated
Definition: Types.h:140
TMVA::Types::kIdentity
@ kIdentity
Definition: Types.h:139
TMVA::Types::kNormalized
@ kNormalized
Definition: Types.h:141
TMVA::Types::kBDT
@ kBDT
Definition: Types.h:111
TMVA::Types::kTesting
@ kTesting
Definition: Types.h:168
TMVA::Types::kBayesClassifier
@ kBayesClassifier
Definition: Types.h:116
TMVA::Types::kC50
@ kC50
Definition: Types.h:129
TMVA::Types::kPCA
@ kPCA
Definition: Types.h:142
TMVA::Types::GetMethodType
Types::EMVA GetMethodType(const TString &method) const
returns the method type (enum) for a given method (string)
Definition: Types.cxx:120
TMVA::Types::DestroyInstance
static void DestroyInstance()
"destructor" of the single instance
Definition: Types.cxx:89
TMVA::Types::kSVM
@ kSVM
Definition: Types.h:114
TMVA::Types::kRSNNS
@ kRSNNS
Definition: Types.h:130
TMVA::Types::kSBBoth
@ kSBBoth
Definition: Types.h:161
TMVA::Types::AddTypeMapping
Bool_t AddTypeMapping(Types::EMVA method, const TString &methodname)
Definition: Types.cxx:100
TMVA::Types::kUniform
@ kUniform
Definition: Types.h:145
TMVA::Types::kMaxSBType
@ kMaxSBType
Definition: Types.h:162
TString
Definition: TString.h:136
TMVA::Types::GetMethodName
TString GetMethodName(Types::EMVA method) const
Definition: Types.cxx:135
TMVA::Types::kSignal
@ kSignal
Definition: Types.h:159
TMVA::Types::kBoostProcBegin
@ kBoostProcBegin
Definition: Types.h:175
TMVA::Types::kLD
@ kLD
Definition: Types.h:120
TString.h
TMVA::Types::kBoost
@ kBoost
Definition: Types.h:118
bool
TMVA::Types::kLikelihood
@ kLikelihood
Definition: Types.h:104
TMVA::Types::fgTypesPtr
static Types * fgTypesPtr
Definition: Types.h:199
TMVA::Types::kPDEFoam
@ kPDEFoam
Definition: Types.h:119
TMVA::Types::kCuts
@ kCuts
Definition: Types.h:103
TMVA::Types::kAfterBoosting
@ kAfterBoosting
Definition: Types.h:178
TMVA::Types::ESBType
ESBType
Definition: Types.h:158
TMVA::Types::kHMatrix
@ kHMatrix
Definition: Types.h:106
TMVA::Types::kKNN
@ kKNN
Definition: Types.h:108
TMVA::Types::kPyRandomForest
@ kPyRandomForest
Definition: Types.h:125
TMVA::Types::kVariable
@ kVariable
Definition: Types.h:102
TMVA::Types::kCFMlpANN
@ kCFMlpANN
Definition: Types.h:109
TMVA::Types::kFisher
@ kFisher
Definition: Types.h:107
TMVA::Types::kBeforeBoosting
@ kBeforeBoosting
Definition: Types.h:177
TMVA::Types::EAnalysisType
EAnalysisType
Definition: Types.h:150
TMVA::Types::ETreeType
ETreeType
Definition: Types.h:166
TMVA::Types::Log
MsgLogger & Log() const
Definition: Types.h:206
TMVA::Types::kRSVM
@ kRSVM
Definition: Types.h:131
TMVA::Types::kGauss
@ kGauss
Definition: Types.h:144
TMVA::Types::kPyGTB
@ kPyGTB
Definition: Types.h:127
TMVA::Types::kPlugins
@ kPlugins
Definition: Types.h:121
TMVA::Types::kClassification
@ kClassification
Definition: Types.h:151
TMVA::Types::kRuleFit
@ kRuleFit
Definition: Types.h:113
TMVA::Types::kCategory
@ kCategory
Definition: Types.h:122
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
TMVA::Types
Definition: Types.h:96
TMVA::Types::kBackground
@ kBackground
Definition: Types.h:160
TMVA::Types::kMaxTreeType
@ kMaxTreeType
Definition: Types.h:169
TMVA::Types::kPDERS
@ kPDERS
Definition: Types.h:105
TMVA::Types::kTraining
@ kTraining
Definition: Types.h:167
TMVA::Types::fStr2type
std::map< TString, TMVA::Types::EMVA > fStr2type
Definition: Types.h:204
TMVA::Types::kMaxMethod
@ kMaxMethod
Definition: Types.h:134
TMVA::Types::kMaxAnalysisType
@ kMaxAnalysisType
Definition: Types.h:155
TMVA::Types::kDL
@ kDL
Definition: Types.h:124
TMVA::Types::kValidation
@ kValidation
Definition: Types.h:170
RtypesCore.h
TMVA::MsgLogger
Definition: MsgLogger.h:83
TMVA::Types::kRXGB
@ kRXGB
Definition: Types.h:132
TMVA::Types::Instance
static Types & Instance()
the the single instance of "Types" if existing already, or create it (Singleton)
Definition: Types.cxx:69
TMVA::Types::EMVA
EMVA
Definition: Types.h:101
TMVA::Types::kMLP
@ kMLP
Definition: Types.h:115
TMVA::Types::kPyAdaBoost
@ kPyAdaBoost
Definition: Types.h:126
TMVA::Types::kFDA
@ kFDA
Definition: Types.h:117
TMVA::Types::kTrainingOriginal
@ kTrainingOriginal
Definition: Types.h:171
TMVA::Types::kRearranged
@ kRearranged
Definition: Types.h:143
TMVA::Types::kBoostProcEnd
@ kBoostProcEnd
Definition: Types.h:179
TMVA::Types::kPyKeras
@ kPyKeras
Definition: Types.h:128
TMVA::Types::fLogger
MsgLogger * fLogger
Definition: Types.h:205
TMVA::Types::kDT
@ kDT
Definition: Types.h:112
TMVA::Types::kMaxVariableTransform
@ kMaxVariableTransform
Definition: Types.h:146
TMVA::Types::EVariableTransform
EVariableTransform
Definition: Types.h:138
TMVA::Types::kBeforeTraining
@ kBeforeTraining
Definition: Types.h:176
TMVA::Types::kNoAnalysisType
@ kNoAnalysisType
Definition: Types.h:154
TMVA
create variable transformations
Definition: GeneticMinimizer.h:22