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 * 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
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 {
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 RtypesCore.h:46
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
@ kTrueType
Definition Types.h:141
@ kBackground
Definition Types.h:138
@ kMaxSBType
Definition Types.h:140
@ kFisher
Definition Types.h:84
@ kCategory
Definition Types.h:99
@ kPyRandomForest
Definition Types.h:102
@ kTMlpANN
Definition Types.h:87
@ kCrossValidation
Definition Types.h:111
@ kPDEFoam
Definition Types.h:96
@ kLikelihood
Definition Types.h:81
@ kPyAdaBoost
Definition Types.h:103
@ kVariable
Definition Types.h:79
@ kBayesClassifier
Definition Types.h:93
@ kHMatrix
Definition Types.h:83
@ kRuleFit
Definition Types.h:90
@ kCFMlpANN
Definition Types.h:86
@ kMaxMethod
Definition Types.h:112
@ kPlugins
Definition Types.h:98
std::map< TString, TMVA::Types::EMVA > fStr2type
Definition Types.h:182
EVariableTransform
Definition Types.h:116
@ kNormalized
Definition Types.h:119
@ kRearranged
Definition Types.h:121
@ 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
@ 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
MsgLogger & Log() const
Definition Types.h:184
Types()
constructor
Definition Types.cxx:55
static Types * fgTypesPtr
Definition Types.h:177
Basic string class.
Definition TString.h:136
create variable transformations