GestureRecognitionToolkit  Version: 0.2.5
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
Neuron.h
Go to the documentation of this file.
1 
31 #ifndef GRT_NEURON_HEADER
32 #define GRT_NEURON_HEADER
33 
34 #include "../../../Util/GRTCommon.h"
35 
36 GRT_BEGIN_NAMESPACE
37 
38 class GRT_API Neuron{
39 public:
40  enum Type{LINEAR=0,SIGMOID,BIPOLAR_SIGMOID,TANH,NUMBER_OF_ACTIVATION_FUNCTIONS};
41 
42  Neuron();
43 
44  Neuron( const Neuron &rhs );
45 
46  ~Neuron();
47 
48  Neuron& operator=(const Neuron &rhs);
49 
50  bool init(const UINT numInputs,const Type actvationFunction,Random &random,const Float minWeightRange = -0.1, const Float maxWeightRange = 0.1,const Float minBiasRange = -0.1,const Float maxBiasRange = 0.1);
51  void clear();
52  Float fire(const VectorFloat &x);
53  Float getDerivative(const Float &y);
54 
55  static bool validateActivationFunction(const Type activationFunction);
56 
57  Float gamma;
58  Float bias;
59  Float previousBiasUpdate;
60  VectorFloat weights;
61  VectorFloat previousUpdate;
62  UINT numInputs;
63  UINT activationFunction;
64 };
65 
66 GRT_END_NAMESPACE
67 
68 #endif //GRT_NEURON_HEADER
69 
70 
This file contains the Random class, a useful wrapper for generating cross platform random functions...
Definition: Random.h:46
Definition: Neuron.h:38