59 if (fLinksIn !=
NULL)
delete fLinksIn;
60 if (fLinksOut !=
NULL)
delete fLinksOut;
77 fInputCalculator =
NULL;
94 if (fForcedValue)
return;
95 fValue = fInputCalculator->GetInput(
this);
103 if (fActivation ==
NULL) {
104 PrintMessage( kWARNING ,
"No activation equation specified." );
108 fActivationValue = fActivation->Eval(fValue);
117 if (IsInputNeuron()) {
125 if (IsOutputNeuron()) error = fError;
139 error +=
synapse->GetWeightedDelta();
144 fDelta = error * fActivation->EvalDerivative(GetValue());
152 if (fInputCalculator !=
NULL)
delete fInputCalculator;
161 if (fActivation !=
NULL)
delete fActivation;
170 if (IsInputNeuron())
return;
179 if (IsOutputNeuron())
return;
180 fLinksOut->Add(
post);
188 DeleteLinksArray(fLinksIn);
213 if (!IsOutputNeuron())
214 PrintMessage( kWARNING,
"Warning! Setting an error on a non-output neuron is probably not what you want to do." );
225 if (IsInputNeuron())
return;
243 if (IsInputNeuron())
return;
264 if (IsInputNeuron())
return;
285 if (IsInputNeuron())
return;
305 Log() << kDEBUG <<
"\t\t\t<none>" <<
Endl;
315 "\t\t\tweighta: " <<
synapse->GetWeight()
316 <<
"\t\tw-value: " <<
synapse->GetWeightedValue()
317 <<
"\t\tw-delta: " <<
synapse->GetWeightedDelta()
318 <<
"\t\tl-rate: " <<
synapse->GetLearningRate()
328 if (fActivation !=
NULL) Log() << kDEBUG << fActivation->GetExpression() <<
Endl;
329 else Log() << kDEBUG <<
"<none>" <<
Endl;
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
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...
void ForceValue(Double_t value)
force the value, typically for input and bias neurons
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
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
void SetError(Double_t error)
set error, this should only be done for an output neuron
void CalculateValue()
calculate neuron input
void CalculateActivationValue()
calculate neuron activation/output
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
void AddPreLink(TSynapse *pre)
add synapse as a pre-link to this neuron
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.
Iterator of object array.
TObject * Next() override
Return next object in array. Returns 0 when no more objects in array.
MsgLogger & Endl(MsgLogger &ml)
static const Int_t UNINITIALIZED