Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 * *
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 * (see tmva/doc/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
62namespace TMVA {
63
64 class TNeuron;
65
67
68 public:
69
71 {
72 fSUM = "sum";
73 fSQSUM = "sqsum";
74 fABSSUM = "abssum";
75 }
77
81 };
82
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 nullptr;
90 }
91 return nullptr;
92 }
93
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 nullptr;
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
#define ClassDef(name, id)
Definition Rtypes.h:342
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
TNeuron input calculator – calculates the sum of the absolute values of the weighted inputs.
Class for easily choosing neuron input functions.
TNeuronInput * CreateNeuronInput(ENeuronInputType type) const
TString fSQSUM
neuron input type name
TString fSUM
neuron input type name
TNeuronInput * CreateNeuronInput(const TString type) const
std::vector< TString > * GetAllNeuronInputNames() const
TString fABSSUM
neuron input type name
TNeuron input calculator – calculates the squared weighted sum of inputs.
TNeuron input calculator – calculates the weighted sum of inputs.
Interface for TNeuron input calculation classes.
This class describes an elementary neuron, which is the basic element for a Neural Network.
Definition TNeuron.h:25
Basic string class.
Definition TString.h:139
create variable transformations