Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 * *
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#include <atomic>
42
43#include "RtypesCore.h"
44
45#include "TString.h"
46
47namespace TMVA {
48
50
51 class MsgLogger;
52
53 // message types for MsgLogger
54 // define outside of Types class to facilite access
55 enum EMsgType {
56 kDEBUG = 1,
58 kINFO = 3,
60 kERROR = 5,
61 kFATAL = 6,
63 kHEADER = 8
64 };
65
67
68 //Variable Importance type
69 enum VIType {kShort=0,kAll=1,kRandom=2};
70
71 class Types {
72
73 public:
74
75 // available MVA methods
76 enum EMVA {
111 };
112
113 // available variable transformations
123 };
124
125 // type of analysis
132 };
133
134 enum ESBType {
135 kSignal = 0, ///< Never change this number - it is elsewhere assumed to be zero !
140 };
141
145 kMaxTreeType, ///< also used as temporary storage for trees not yet assigned for testing;training...
146 kValidation, ///< these are placeholders... currently not used, but could be moved "forward" if
147 kTrainingOriginal ///< ever needed
148 };
149
156 };
157
158 public:
159
160 static Types& Instance();
161 static void DestroyInstance();
162 ~Types();
163
164 Types::EMVA GetMethodType( const TString& method ) const;
165 TString GetMethodName( Types::EMVA method ) const;
166
167 Bool_t AddTypeMapping(Types::EMVA method, const TString& methodname);
168
169 private:
170
171 Types();
172#if !defined _MSC_VER
173 static std::atomic<Types*> fgTypesPtr;
174#else
175 static Types* fgTypesPtr;
176#endif
177
178 private:
179
180 std::map<TString, TMVA::Types::EMVA> fStr2type; ///< types-to-text map
181 mutable MsgLogger* fLogger; ///< message logger
182 MsgLogger& Log() const { return *fLogger; }
183
184 };
185}
186
187#endif
bool Bool_t
Definition RtypesCore.h:63
unsigned int UInt_t
Definition RtypesCore.h:46
ostringstream derivative to redirect and format output
Definition MsgLogger.h:57
Singleton class for Global types used by TMVA.
Definition Types.h:71
static void DestroyInstance()
"destructor" of the single instance
Definition Types.cxx:90
@ kBoostProcBegin
Definition Types.h:151
@ kBeforeBoosting
Definition Types.h:153
@ kAfterBoosting
Definition Types.h:154
@ kBoostProcEnd
Definition Types.h:155
@ kBeforeTraining
Definition Types.h:152
static std::atomic< Types * > fgTypesPtr
Definition Types.h:173
TString GetMethodName(Types::EMVA method) const
Definition Types.cxx:136
static Types & Instance()
The single instance of "Types" if existing already, or create it (Singleton)
Definition Types.cxx:70
Bool_t AddTypeMapping(Types::EMVA method, const TString &methodname)
Definition Types.cxx:101
@ kSignal
Never change this number - it is elsewhere assumed to be zero !
Definition Types.h:135
@ kTrueType
Definition Types.h:139
@ kBackground
Definition Types.h:136
@ kMaxSBType
Definition Types.h:138
@ kFisher
Definition Types.h:82
@ kCategory
Definition Types.h:97
@ kPyRandomForest
Definition Types.h:100
@ kTMlpANN
Definition Types.h:85
@ kCrossValidation
Definition Types.h:109
@ kPDEFoam
Definition Types.h:94
@ kLikelihood
Definition Types.h:79
@ kPyAdaBoost
Definition Types.h:101
@ kVariable
Definition Types.h:77
@ kBayesClassifier
Definition Types.h:91
@ kHMatrix
Definition Types.h:81
@ kRuleFit
Definition Types.h:88
@ kCFMlpANN
Definition Types.h:84
@ kMaxMethod
Definition Types.h:110
@ kPlugins
Definition Types.h:96
std::map< TString, TMVA::Types::EMVA > fStr2type
types-to-text map
Definition Types.h:180
EVariableTransform
Definition Types.h:114
@ kNormalized
Definition Types.h:117
@ kRearranged
Definition Types.h:119
@ kIdentity
Definition Types.h:115
@ kMaxVariableTransform
Definition Types.h:122
@ kDecorrelated
Definition Types.h:116
Types::EMVA GetMethodType(const TString &method) const
returns the method type (enum) for a given method (string)
Definition Types.cxx:121
@ kMulticlass
Definition Types.h:129
@ kNoAnalysisType
Definition Types.h:130
@ kClassification
Definition Types.h:127
@ kMaxAnalysisType
Definition Types.h:131
@ kRegression
Definition Types.h:128
MsgLogger * fLogger
message logger
Definition Types.h:181
@ kMaxTreeType
also used as temporary storage for trees not yet assigned for testing;training...
Definition Types.h:145
@ kTrainingOriginal
ever needed
Definition Types.h:147
@ kTraining
Definition Types.h:143
@ kValidation
these are placeholders... currently not used, but could be moved "forward" if
Definition Types.h:146
MsgLogger & Log() const
Definition Types.h:182
Types()
constructor
Definition Types.cxx:56
VIType
Definition Types.h:69
@ kRandom
Definition Types.h:69
@ kAll
Definition Types.h:69
@ kShort
Definition Types.h:69
EMsgType
Definition Types.h:55
@ kSILENT
Definition Types.h:62
@ kDEBUG
Definition Types.h:56
@ kVERBOSE
Definition Types.h:57
@ kHEADER
Definition Types.h:63
@ kERROR
Definition Types.h:60
@ kINFO
Definition Types.h:58
@ kWARNING
Definition Types.h:59
@ kFATAL
Definition Types.h:61
HistType
Definition Types.h:66
@ kRarityType
Definition Types.h:66
@ kCompareType
Definition Types.h:66
@ kProbaType
Definition Types.h:66
@ kMVAType
Definition Types.h:66
UInt_t TMVAVersion_t
Definition Types.h:49
Basic string class.
Definition TString.h:139
create variable transformations