public float GetBiasAdjust(float[,] activationArray, float cost) { if (float.IsNaN(cost) || float.IsNaN(activationArray[1, 0])) { throw new Exception(); } var activation = activationArray[NeuronLocation.Layer, NeuronLocation.Neuron]; var derivative = cost * _activationFunction.GetDerivedValue(activation); return(derivative); }