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
49namespace TMVA {
50
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,
60 kINFO = 3,
62 kERROR = 5,
63 kFATAL = 6,
65 kHEADER = 8
66 };
67
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 {
113 };
114
115 // available variable transformations
125 };
126
127 // type of analysis
134 };
135
136 enum ESBType {
137 kSignal = 0, // Never change this number - it is elsewhere assumed to be zero !
142 };
143
147 kMaxTreeType, // also used as temporary storage for trees not yet assigned for testing;training...
148 kValidation, // these are placeholders... currently not used, but could be moved "forward" if
149 kTrainingOriginal // ever needed
150 };
151
158 };
159
160 public:
161
162 static Types& Instance();
163 static void DestroyInstance();
164 ~Types();
165
166 Types::EMVA GetMethodType( const TString& method ) const;
167 TString GetMethodName( Types::EMVA method ) const;
168
169 Bool_t AddTypeMapping(Types::EMVA method, const TString& methodname);
170
171 private:
172
173 Types();
174#if __cplusplus > 199711L && !defined _MSC_VER
175 static std::atomic<Types*> fgTypesPtr;
176#else
178#endif
179
180 private:
181
182 std::map<TString, TMVA::Types::EMVA> fStr2type; // types-to-text map
183 mutable MsgLogger* fLogger; // message logger
184 MsgLogger& Log() const { return *fLogger; }
185
186 };
187}
188
189#endif
unsigned int UInt_t
Definition: CPyCppyy.h:44
bool Bool_t
Definition: RtypesCore.h:63
ostringstream derivative to redirect and format output
Definition: MsgLogger.h:59
Singleton class for Global types used by TMVA.
Definition: Types.h:73
static void DestroyInstance()
"destructor" of the single instance
Definition: Types.cxx:89
@ kBoostProcBegin
Definition: Types.h:153
@ kBeforeBoosting
Definition: Types.h:155
@ kAfterBoosting
Definition: Types.h:156
@ kBoostProcEnd
Definition: Types.h:157
@ kBeforeTraining
Definition: Types.h:154
TString GetMethodName(Types::EMVA method) const
Definition: Types.cxx:135
static Types & Instance()
the the single instance of "Types" if existing already, or create it (Singleton)
Definition: Types.cxx:69
Bool_t AddTypeMapping(Types::EMVA method, const TString &methodname)
Definition: Types.cxx:100
@ kSignal
Definition: Types.h:137
@ kTrueType
Definition: Types.h:141
@ kBackground
Definition: Types.h:138
@ kSBBoth
Definition: Types.h:139
@ kMaxSBType
Definition: Types.h:140
@ kFisher
Definition: Types.h:84
@ kCategory
Definition: Types.h:99
@ kPyRandomForest
Definition: Types.h:102
@ kPyKeras
Definition: Types.h:105
@ kTMlpANN
Definition: Types.h:87
@ kCrossValidation
Definition: Types.h:111
@ kFDA
Definition: Types.h:94
@ kBDT
Definition: Types.h:88
@ kPDERS
Definition: Types.h:82
@ kRSNNS
Definition: Types.h:108
@ kPDEFoam
Definition: Types.h:96
@ kLikelihood
Definition: Types.h:81
@ kCuts
Definition: Types.h:80
@ kPyAdaBoost
Definition: Types.h:103
@ kVariable
Definition: Types.h:79
@ kBayesClassifier
Definition: Types.h:93
@ kHMatrix
Definition: Types.h:83
@ kBoost
Definition: Types.h:95
@ kPyTorch
Definition: Types.h:106
@ kSVM
Definition: Types.h:91
@ kRuleFit
Definition: Types.h:90
@ kCFMlpANN
Definition: Types.h:86
@ kMaxMethod
Definition: Types.h:112
@ kPyGTB
Definition: Types.h:104
@ kKNN
Definition: Types.h:85
@ kMLP
Definition: Types.h:92
@ kPlugins
Definition: Types.h:98
std::map< TString, TMVA::Types::EMVA > fStr2type
Definition: Types.h:182
EVariableTransform
Definition: Types.h:116
@ kUniform
Definition: Types.h:123
@ kNormalized
Definition: Types.h:119
@ kRearranged
Definition: Types.h:121
@ kGauss
Definition: Types.h:122
@ kIdentity
Definition: Types.h:117
@ kMaxVariableTransform
Definition: Types.h:124
@ kDecorrelated
Definition: Types.h:118
Types::EMVA GetMethodType(const TString &method) const
returns the method type (enum) for a given method (string)
Definition: Types.cxx:120
EAnalysisType
Definition: Types.h:128
@ kMulticlass
Definition: Types.h:131
@ kNoAnalysisType
Definition: Types.h:132
@ kClassification
Definition: Types.h:129
@ kMaxAnalysisType
Definition: Types.h:133
@ kRegression
Definition: Types.h:130
MsgLogger * fLogger
Definition: Types.h:183
@ kMaxTreeType
Definition: Types.h:147
@ kTrainingOriginal
Definition: Types.h:149
@ kTraining
Definition: Types.h:145
@ kValidation
Definition: Types.h:148
@ kTesting
Definition: Types.h:146
MsgLogger & Log() const
Definition: Types.h:184
Types()
constructor
Definition: Types.cxx:55
static Types * fgTypesPtr
Definition: Types.h:177
VIType
Definition: Types.h:71
@ kRandom
Definition: Types.h:71
@ kAll
Definition: Types.h:71
@ kShort
Definition: Types.h:71
EMsgType
Definition: Types.h:57
@ kSILENT
Definition: Types.h:64
@ kDEBUG
Definition: Types.h:58
@ kVERBOSE
Definition: Types.h:59
@ kHEADER
Definition: Types.h:65
@ kERROR
Definition: Types.h:62
@ kINFO
Definition: Types.h:60
@ kWARNING
Definition: Types.h:61
@ kFATAL
Definition: Types.h:63
HistType
Definition: Types.h:68
@ kRarityType
Definition: Types.h:68
@ kCompareType
Definition: Types.h:68
@ kProbaType
Definition: Types.h:68
@ kMVAType
Definition: Types.h:68
UInt_t TMVAVersion_t
Definition: Types.h:51
Basic string class.
Definition: TString.h:136
create variable transformations