00001 #ifndef _PARAMETRIZEDNEURON_H 00002 #define _PARAMETRIZEDNEURON_H 00003 00004 #include "AbstractNeuron.h" 00005 #include "defines.h" 00006 00007 namespace annie 00008 { 00009 00010 typedef real(*ParametrizedActivationFunction)(real, real parameter); 00011 00013 real psigmoid(real x, real lambda); 00014 00016 real dpsigmoid(real x, real lambda); 00017 00025 class ParametrizedNeuron : public AbstractNeuron 00026 { 00027 protected: 00029 ParametrizedActivationFunction _dParametrizedActivationFunction; 00030 00033 real _parameter; 00034 00036 virtual void _recacheOutput(); 00037 00039 virtual void _recacheError(); 00040 00041 public: 00047 ParametrizedNeuron(int label, real initialParameter=1.0, bool hasBias = true); 00048 00056 virtual void setDesiredOutput(real desired); 00057 00059 virtual const char *getClassName(); 00060 }; 00061 00062 00063 00064 }; //namespace annie 00065 00066 00067 #endif // define _GABNEURON_H 00068