Accord.Math.Optimization.LevenbergMarquardt.computeJacobian C# (CSharp) Method

computeJacobian() private method

private computeJacobian ( double input, int block ) : void
input double
block int
return void
        private void computeJacobian(double[][] input, int[] block)
        {
            double[] derivatives = new double[numberOfParameters];

            // for each input sample
            foreach (int i in block)
            {
                // TODO: transpose the Jacobian to remove copying

                Gradient(solution, input[i], derivatives);

                // copy the gradient vector into the Jacobian
                for (int j = 0; j < derivatives.Length; j++)
                    jacobian[j][i] = derivatives[j];
            }
        }