ROOT
6.07/01
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
tmva
tmva
inc
TMVA
TNeuronInputChooser.h
Go to the documentation of this file.
1
// @(#)root/tmva $Id$
2
// Author: Matt Jachowski
3
4
/**********************************************************************************
5
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6
* Package: TMVA *
7
* Class : TMVA::TNeuronInputChooser *
8
* Web : http://tmva.sourceforge.net *
9
* *
10
* Description: *
11
* Class for easily choosing neuron input functions. *
12
* *
13
* Authors (alphabetical): *
14
* Matt Jachowski <jachowski@stanford.edu> - Stanford University, USA *
15
* *
16
* Copyright (c) 2005: *
17
* CERN, Switzerland *
18
* *
19
* Redistribution and use in source and binary forms, with or without *
20
* modification, are permitted according to the terms listed in LICENSE *
21
* (http://tmva.sourceforge.net/LICENSE) *
22
**********************************************************************************/
23
24
25
#ifndef ROOT_TMVA_TNeuronInputChooser
26
#define ROOT_TMVA_TNeuronInputChooser
27
28
//////////////////////////////////////////////////////////////////////////
29
// //
30
// TNeuronInputChooser //
31
// //
32
// Class for easily choosing neuron input functions //
33
// //
34
//////////////////////////////////////////////////////////////////////////
35
36
#include <vector>
37
#ifndef ROOT_TString
38
#include "
TString.h
"
39
#endif
40
41
#ifndef ROOT_TMVA_TActivation
42
#ifndef ROOT_TNeuronInput
43
#include "
TNeuronInput.h
"
44
#endif
45
#endif
46
#ifndef ROOT_TMVA_TNeuronInputSum
47
#ifndef ROOT_TNeuronInputSum
48
#include "
TNeuronInputSum.h
"
49
#endif
50
#endif
51
#ifndef ROOT_TMVA_TNeuronInputSqSum
52
#ifndef ROOT_TNeuronInputSqSum
53
#include "
TNeuronInputSqSum.h
"
54
#endif
55
#endif
56
#ifndef ROOT_TMVA_TNeuronInputAbs
57
#ifndef ROOT_TNeuronInputAbs
58
#include "
TNeuronInputAbs.h
"
59
#endif
60
#endif
61
62
namespace
TMVA {
63
64
class
TNeuron
;
65
66
class
TNeuronInputChooser
{
67
68
public
:
69
70
TNeuronInputChooser
()
71
{
72
fSUM
=
"sum"
;
73
fSQSUM
=
"sqsum"
;
74
fABSSUM
=
"abssum"
;
75
}
76
virtual
~TNeuronInputChooser
() {}
77
78
enum
ENeuronInputType
{
kSum
= 0,
79
kSqSum
,
80
kAbsSum
81
};
82
83
TNeuronInput
*
CreateNeuronInput
(
ENeuronInputType
type
)
const
84
{
85
switch
(type) {
86
case
kSum
:
return
new
TNeuronInputSum
();
87
case
kSqSum
:
return
new
TNeuronInputSqSum
();
88
case
kAbsSum
:
return
new
TNeuronInputAbs
();
89
default
:
return
NULL
;
90
}
91
return
NULL
;
92
}
93
94
TNeuronInput
*
CreateNeuronInput
(
const
TString
type
)
const
95
{
96
if
(type ==
fSUM
)
return
CreateNeuronInput
(
kSum
);
97
else
if
(type ==
fSQSUM
)
return
CreateNeuronInput
(
kSqSum
);
98
else
if
(type ==
fABSSUM
)
return
CreateNeuronInput
(
kAbsSum
);
99
else
return
NULL
;
100
}
101
102
std::vector<TString>*
GetAllNeuronInputNames
()
const
103
{
104
std::vector<TString>* names =
new
std::vector<TString>();
105
names->push_back(
fSUM
);
106
names->push_back(
fSQSUM
);
107
names->push_back(
fABSSUM
);
108
return
names;
109
}
110
111
private
:
112
113
TString
fSUM
;
// neuron input type name
114
TString
fSQSUM
;
// neuron input type name
115
TString
fABSSUM
;
// neuron input type name
116
117
ClassDef
(
TNeuronInputChooser
,0)
// Class for choosing neuron input functions
118
};
119
120
}
// namespace TMVA
121
122
#endif
TMVA::TNeuronInputChooser::fSUM
TString fSUM
Definition:
TNeuronInputChooser.h:113
TString
Basic string class.
Definition:
TString.h:137
TNeuronInputAbs.h
TMVA::TNeuronInputChooser::kSqSum
Definition:
TNeuronInputChooser.h:79
TMVA::TNeuronInputChooser::CreateNeuronInput
TNeuronInput * CreateNeuronInput(const TString type) const
Definition:
TNeuronInputChooser.h:94
ClassDef
#define ClassDef(name, id)
Definition:
Rtypes.h:254
TMVA::TNeuronInputSum
Definition:
TNeuronInputSum.h:52
TMVA::TNeuronInputAbs
Definition:
TNeuronInputAbs.h:70
TMVA::TNeuronInputChooser::kAbsSum
Definition:
TNeuronInputChooser.h:80
TString.h
TMVA::TNeuronInputChooser::~TNeuronInputChooser
virtual ~TNeuronInputChooser()
Definition:
TNeuronInputChooser.h:76
TMVA::TNeuronInputChooser::TNeuronInputChooser
TNeuronInputChooser()
Definition:
TNeuronInputChooser.h:70
TNeuronInputSqSum.h
TMVA::TNeuronInputChooser
Definition:
TNeuronInputChooser.h:66
TMVA::TNeuronInputChooser::fSQSUM
TString fSQSUM
Definition:
TNeuronInputChooser.h:114
TNeuron
Definition:
TNeuron.h:48
TMVA::TNeuronInputChooser::ENeuronInputType
ENeuronInputType
Definition:
TNeuronInputChooser.h:78
type
int type
Definition:
TGX11.cxx:120
TMVA::TNeuronInputChooser::kSum
Definition:
TNeuronInputChooser.h:78
TMVA::TNeuronInputSqSum
Definition:
TNeuronInputSqSum.h:54
TMVA::TNeuronInputChooser::CreateNeuronInput
TNeuronInput * CreateNeuronInput(ENeuronInputType type) const
Definition:
TNeuronInputChooser.h:83
NULL
#define NULL
Definition:
Rtypes.h:82
TMVA::TNeuronInputChooser::fABSSUM
TString fABSSUM
Definition:
TNeuronInputChooser.h:115
TMVA::TNeuronInput
Definition:
TNeuronInput.h:46
TMVA::TNeuronInputChooser::GetAllNeuronInputNames
std::vector< TString > * GetAllNeuronInputNames() const
Definition:
TNeuronInputChooser.h:102
TNeuronInput.h
TNeuronInputSum.h