Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
IMethod.h
Go to the documentation of this file.
1// @(#)root/tmva $Id$
2// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
3
4/**********************************************************************************
5 * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6 * Package: TMVA *
7 * Class : IMethod *
8 * Web : http://tmva.sourceforge.net *
9 * *
10 * Description: *
11 * Interface for all concrete MVA method implementations *
12 * *
13 * Authors (alphabetical): *
14 * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
15 * Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland *
16 * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
17 * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
18 * *
19 * Copyright (c) 2005: *
20 * CERN, Switzerland *
21 * U. of Victoria, Canada *
22 * MPI-K Heidelberg, Germany *
23 * LAPP, Annecy, France *
24 * *
25 * Redistribution and use in source and binary forms, with or without *
26 * modification, are permitted according to the terms listed in LICENSE *
27 * (http://tmva.sourceforge.net/LICENSE) *
28 **********************************************************************************/
29
30#ifndef ROOT_TMVA_IMethod
31#define ROOT_TMVA_IMethod
32
33//////////////////////////////////////////////////////////////////////////
34// //
35// IMethod //
36// //
37// Interface for all concrete MVA method implementations //
38// //
39//////////////////////////////////////////////////////////////////////////
40
41#include "TString.h"
42#include <iosfwd>
43#include "Rtypes.h"
44#include "TMVA/Types.h"
45
46class TString;
47
48namespace TMVA {
49
50 class Ranking;
51 class MethodBoost;
52
53 class IMethod {
54
55 public:
56
57 // default constructor
59
60 // default destructor
61 virtual ~IMethod() {}
62
63 // ------- virtual member functions to be implemented by each MVA method
64 // the name of the method
65 virtual const char *GetName() const = 0;
66
67 // calculate the MVA value - some methods may return a per-event error estimate (unless: *err = -1)
68 virtual Double_t GetMvaValue( Double_t* err = 0, Double_t* errUpper = 0 ) = 0;
69
70 // training method
71 virtual void Train( void ) = 0;
72
73 // read weights from output stream
74 virtual void ReadWeightsFromStream( std::istream& ) = 0;
75
76 // write method specific monitoring histograms to target file
77 virtual void WriteMonitoringHistosToFile( void ) const = 0;
78
79 // make ROOT-independent C++ class for classifier response
80 virtual void MakeClass( const TString& classFileName = TString("") ) const = 0;
81
82 // create ranking
83 virtual const Ranking* CreateRanking() = 0;
84
85 // print help message
86 virtual void PrintHelpMessage() const = 0;
87
88 virtual void Init() = 0;
89 virtual void DeclareOptions() = 0;
90 virtual void ProcessOptions() = 0;
91
92 virtual Bool_t HasAnalysisType( Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets ) = 0;
93
94 protected:
95
96 // make ROOT-independent C++ class for classifier response (classifier-specific implementation)
97 virtual void MakeClassSpecific( std::ostream&, const TString& ) const = 0;
98
99 // get specific help message from classifier
100 virtual void GetHelpMessage() const = 0;
101
102 ClassDef(IMethod,0); // Method Interface
103
104 };
105} // namespace TMVA
106
107#endif
double Double_t
Definition RtypesCore.h:59
#define ClassDef(name, id)
Definition Rtypes.h:325
int type
Definition TGX11.cxx:121
Interface for all concrete MVA method implementations.
Definition IMethod.h:53
virtual const char * GetName() const =0
virtual void DeclareOptions()=0
virtual void WriteMonitoringHistosToFile(void) const =0
virtual void PrintHelpMessage() const =0
virtual void GetHelpMessage() const =0
virtual ~IMethod()
Definition IMethod.h:61
virtual Bool_t HasAnalysisType(Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets)=0
virtual void MakeClass(const TString &classFileName=TString("")) const =0
virtual void Init()=0
virtual void MakeClassSpecific(std::ostream &, const TString &) const =0
virtual const Ranking * CreateRanking()=0
virtual void ProcessOptions()=0
virtual void Train(void)=0
virtual Double_t GetMvaValue(Double_t *err=0, Double_t *errUpper=0)=0
virtual void ReadWeightsFromStream(std::istream &)=0
Ranking for variables in method (implementation)
Definition Ranking.h:48
Basic string class.
Definition TString.h:136
create variable transformations