1 #ifndef CSIGMOIDALNEURON_H
2 #define CSIGMOIDALNEURON_H
7 #include <boost/shared_ptr.hpp>
8 #include <boost/function.hpp>
26 std::vector<double> OldDelta;
28 boost::shared_ptr<GeneralLinearCombiner> Combiner;
30 boost::shared_ptr<GeneralActivationFunction> Function;
40 virtual double CalcOutput();
54 return Function->CalcDeriv(input);
79 return Combiner->GetBias();
84 return Combiner->GetWeights();
89 return Combiner->SetWeights();
94 return Combiner->GetInput();
106 #endif // CSIGMOIDALNEURON_H
virtual std::vector< double > & SetOldDelta()
virtual double GetDelta()
Get the delta term of the weight correction formula.
virtual ~SigmoidalNeuron()
virtual std::vector< double > & SetWeights()
Set the weights.
virtual void SetDelta(const double d)
Set the delta term of the weight correction formula.
virtual const std::vector< double > & GetOldDelta()
Get the last weight correction for momentum adaptation.
virtual void SetInput(const GeneralLinearCombiner::tinvector &input)
Set the input neurons.
virtual double GetBias()
Get the bias of the linear combiner.
virtual double CalcDeriv(const double input)
Return the derivative of the activation function.
The base class for all neurons in a neural network.
virtual void SetType(tneurontype type)
Set the type of neuron, determines the activation function.
virtual const std::vector< double > & GetWeights()
Get the weights.
SigmoidalNeuron(tneurontype type, bool wantcached=false)
Construct neuron with a known type.
virtual void SetBias(const double b)
Set the bias of the linear combiner, the following functions are mostly for convenience access...
SigmoidalNeuron implements the main functionality of neurons in a neural network. ...
virtual const GeneralLinearCombiner::tinvector & GetInput()
Get the input neurons.
virtual double GetNet()
Get the raw output of the linear combiner.
std::vector< boost::shared_ptr< GeneralNeuron > > tinvector
tneurontype
At the moment there are two types of neurons: bipolar and identity, they differ in their activation f...