Encog.Neural.Networks.Training.Lma.LevenbergMarquardtTraining.UpdateWeights C# (CSharp) Method

UpdateWeights() public method

Update the weights.
public UpdateWeights ( ) : double
return double
        public double UpdateWeights()
        {
            double result = 0;
            var w = (double[]) _weights.Clone();

            for (int i = 0; i < w.Length; i++)
            {
                w[i] += _deltas[i];
                result += w[i]*w[i];
            }

            NetworkCODEC.ArrayToNetwork(w, _network);

            return result/2.0d;
        }