32 const char*
name =
"",
const char* title =
"",
33 const char* extF =
"",
const char* extD =
"" );
#define ClassDef(name, id)
A TTree is a list of TBranches.
The TNamed class is the base class for all named ROOT classes.
This class describes an elementary neuron, which is the basic element for a Neural Network.
Double_t GetDerivative() const
computes the derivative for the appropriate function at the working point
Double_t fWeight
weight used for computation
TObjArray fpost
pointers to the next level in a network
Double_t GetWeight() const
void SetWeight(Double_t w)
Sets the neuron weight to w.
TNeuron(ENeuronType type=kSigmoid, const char *name="", const char *title="", const char *extF="", const char *extD="")
Usual constructor.
TObjArray flayer
pointers to the current level in a network (neurons, not synapses)
TFormula * fExtD
derivative (external mode)
Double_t fDerivative
! buffer containing the last neuron derivative
Bool_t fNewInput
! do we need to compute fInput again ?
TTreeFormula * fFormula
! formula to be used for inputs and outputs
Int_t fIndex
! index in the formula
Double_t fDEDw
! buffer containing the sum over all examples of DeDw
Double_t GetValue() const
Computes the output using the appropriate function and all the weighted inputs, or uses the branch as...
Double_t Sigmoid(Double_t x) const
The Sigmoid.
Double_t fDeDw
! buffer containing the last derivative of the error
void SetDEDw(Double_t in)
Sets the derivative of the total error wrt the neuron weight.
Double_t GetDeDw() const
Computes the derivative of the error wrt the neuron weight.
Double_t GetBranch() const
Returns the formula value.
TNeuron * GetInLayer(Int_t n) const
Double_t GetError() const
Computes the error for output neurons.
Bool_t fNewValue
! do we need to compute fValue again ?
void AddPost(TSynapse *)
Adds a synapse to the neuron as an output This method is used by the TSynapse while connecting two ne...
TTreeFormula * UseBranch(TTree *, const char *)
Sets a formula that can be used to make the neuron an input.
TSynapse * GetPre(Int_t n) const
Bool_t fNewDeriv
! do we need to compute fDerivative again ?
void ForceExternalValue(Double_t value)
Uses the branch type to force an external value.
Double_t fInput
! buffer containing the last neuron input
TSynapse * GetPost(Int_t n) const
Double_t GetTarget() const
Computes the normalized target pattern for output neurons.
Double_t fNorm[2]
normalisation to mean=0, RMS=1.
Double_t GetInput() const
Returns neuron input.
const Double_t * GetNormalisation() const
Double_t DSigmoid(Double_t x) const
The Derivative of the Sigmoid.
ENeuronType fType
neuron type
void AddPre(TSynapse *)
Adds a synapse to the neuron as an input This method is used by the TSynapse while connecting two neu...
TNeuron & operator=(const TNeuron &)
TFormula * fExtF
function (external mode)
ENeuronType GetType() const
Returns the neuron type.
Bool_t fNewDeDw
! do we need to compute fDeDw again ?
Double_t fValue
! buffer containing the last neuron output
void SetNewEvent() const
Inform the neuron that inputs of the network have changed, so that the buffered values have to be rec...
void SetNormalisation(Double_t mean, Double_t RMS)
Sets the normalization variables.
void AddInLayer(TNeuron *)
Tells a neuron which neurons form its layer (including itself).
TObjArray fpre
pointers to the previous level in a network
TObject * At(Int_t idx) const
This is a simple weighted bidirectional connection between two neurons.
A TTree represents a columnar dataset.
Double_t RMS(Long64_t n, const T *a, const Double_t *w=0)
Return the Standard Deviation of an array a with length n.