1 namespace SpikingNeuronNetwork.Lib.Training
5 using System.Collections.Generic;
16 public Dictionary<Synapse, Tuple<double, int>> ErrorDerivativeTotal {
get; set; }
24 ErrorDerivativeTotal =
new Dictionary<Synapse, Tuple<double, int>>();
25 foreach (var synapse
in errorDerivativeParameters.GetSynapses())
27 ErrorDerivativeTotal.Add(synapse,
new Tuple<double, int>(errorDerivativeParameters.GetErrorDerivative(synapse), 1));
38 if (ErrorDerivativeTotal.ContainsKey(synapse))
40 ErrorDerivativeTotal[synapse] =
new Tuple<double, int>(
41 ErrorDerivativeTotal[synapse].Item1 + errorDerivativeValue,
42 ErrorDerivativeTotal[synapse].Item2 + 1);
46 ErrorDerivativeTotal.Add(synapse,
new Tuple<double, int>(errorDerivativeValue, 1));
56 return ErrorDerivativeTotal.Keys.ToList();
66 return ErrorDerivativeTotal[synapse].Item1 / ErrorDerivativeTotal[synapse].Item2;
ErrorDerivativeParametersBatch(ErrorDerivativeParameters errorDerivativeParameters)
Creates a new instance of ErrorDerivativeParametersBatch from an ErrorDerivateParameters object ...
double GetErrorDerivative(Synapse synapse)
Get the derivate of the error relative change in weight for a certain synapse
List< Synapse > GetSynapses()
Gets a list of the synapses for which there are error derivative parameters
Error Derivative Parameters Batch Class For Tracking Running Totals in Error Derivatives ...
void AddErrorDerivative(Synapse synapse, double errorDerivativeValue)
Adds errorDerivativeValue to the ErrorDerivativeTotal dictionary at synapse
Error Derivative Parameters Interface
Error Derivative Parameters Class