104 PrintMessage( kWARNING ,
"No activation equation specified." );
138 if (synapse == NULL)
break;
196 if (links == NULL)
return;
200 for (
Int_t i=0; i<numLinks; i++) {
202 if (synapse != NULL)
delete synapse;
214 PrintMessage( kWARNING,
"Warning! Setting an error on a non-output neuron is probably not what you want to do." );
231 if (synapse == NULL)
break;
250 if (synapse == NULL)
break;
272 if (synapse == NULL)
break;
293 if (synapse == NULL)
break;
305 Log() << kDEBUG <<
"\t\t\t<none>" <<
Endl;
312 for (
Int_t i = 0; i < numLinks; i++) {
315 "\t\t\tweighta: " << synapse->
GetWeight()
329 else Log() << kDEBUG <<
"<none>" <<
Endl;
337 Log() << type << message <<
Endl;
344 TTHREAD_TLS_DECL_ARG2(
MsgLogger,logger,
"TNeuron",kDEBUG);
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
ostringstream derivative to redirect and format output
Interface for TNeuron activation function classes.
void AdjustSynapseWeights()
adjust the pre-synapses' weights for each neuron (input neuron has no pre-synapse) this method should...
Double_t fDEDw
sum of all deltas
Double_t fDelta
error field of neuron
void ForceValue(Double_t value)
force the value, typically for input and bias neurons
Bool_t IsOutputNeuron() const
TNeuron()
standard constructor
void UpdateSynapsesSequential()
update the pre-synapses for each neuron (input neuron has no pre-synapse) this method should only be ...
void PrintMessage(EMsgType, TString message)
print message, for debugging
TActivation * fActivation
activation equation
Bool_t IsInputNeuron() const
void SetActivationEqn(TActivation *activation)
set activation equation
void InitNeuron()
initialize the neuron, most variables still need to be set via setters
void AddPostLink(TSynapse *post)
add synapse as a post-link to this neuron
void SetInputCalculator(TNeuronInput *calculator)
set input calculator
void PrintActivationEqn()
print activation equation, for debugging
Double_t fActivationValue
activation/output value
Double_t fValue
input value
void SetError(Double_t error)
set error, this should only be done for an output neuron
void CalculateValue()
calculate neuron input
TObjArray * fLinksOut
array of output synapses
void CalculateActivationValue()
calculate neuron activation/output
TNeuronInput * fInputCalculator
input calculator
Double_t fError
error, only set for output neurons
TObjArray * fLinksIn
array of input synapses
void UpdateSynapsesBatch()
update and adjust the pre-synapses for each neuron (input neuron has no pre-synapse) this method shou...
void DeleteLinksArray(TObjArray *&links)
delete an array of TSynapses
virtual ~TNeuron()
destructor
Bool_t fForcedValue
flag for forced input value
void AddPreLink(TSynapse *pre)
add synapse as a pre-link to this neuron
Double_t GetValue() const
void DeletePreLinks()
delete all pre-links
void InitSynapseDeltas()
initialize the error fields of all pre-neurons this method should only be called in batch mode
void CalculateDelta()
calculate error field
void PrintLinks(TObjArray *links) const
print an array of TSynapses, for debugging
Synapse class used by TMVA artificial neural network methods.
Double_t GetWeightedValue()
get output of pre-neuron weighted by synapse weight
Double_t GetLearningRate()
Double_t GetWeightedDelta()
get error field of post-neuron weighted by synapse weight
void AdjustWeight()
adjust the weight based on the error field all ready calculated by CalculateDelta
void CalculateDelta()
calculate/adjust the error field for this synapse
Iterator of object array.
TObject * Next() override
Return next object in array. Returns 0 when no more objects in array.
Int_t GetEntriesFast() const
TObject * At(Int_t idx) const override
MsgLogger & Endl(MsgLogger &ml)
static const Int_t UNINITIALIZED