public LevenbergMarquardt(functionDelegate regressionFunction, Parameter[] regressionParameters, Parameter[] observedParameters, double[,] data, int numberOfDerivativePoints) { Debug.Assert(data.GetLength(0) == observedParameters.Length + 1); _data = data; _observedParameters = observedParameters; _regressionParameters = regressionParameters; _regressionFunction = regressionFunction; int numberOfParameters = _regressionParameters.Length; int numberOfPoints = data.GetLength(1); _derivatives = new Derivatives(numberOfDerivativePoints); _jacobian = new Matrix(numberOfPoints, numberOfParameters); _residuals = new Matrix(numberOfPoints, 1); _regressionParameters0 = new Matrix(numberOfParameters, 1); }
public LevenbergMarquardt(functionDelegate regressionFunction, Parameter[] regressionParameters, Parameter[] observedParameters, double[,] data, int numberOfDerivativePoints) { Debug.Assert(data.GetLength(0) == observedParameters.Length + 1); _data = data; _observedParameters = observedParameters; _regressionParameters = regressionParameters; _regressionFunction = regressionFunction; int numberOfParameters = _regressionParameters.Length; int numberOfPoints = data.GetLength(1); _derivatives = new Derivatives(numberOfDerivativePoints); _jacobian = new Matrix(numberOfPoints, numberOfParameters); _residuals = new Matrix(numberOfPoints, 1); _regressionParameters0 = new Matrix(numberOfParameters, 1); }