Click or drag to resize

NLFitLevenbergMarquardtFit(NLFitLMFunction, Double, Double, Double, Double, Double, Int32, Double, Double, Int32, Double, Int32, Int32, Int32, Double, Int32, Int32, Double, Double, Double, Double, Double, CancellationToken) Method

Most general interface to the Levenberg-Marquardt algorithm.

Namespace: Altaxo.Calc.Regression
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntax
C#
public static void LevenbergMarquardtFit(
	NLFitLMFunction fcn,
	double[] xvec,
	double[] fvec,
	double ftol,
	double xtol,
	double gtol,
	int maxfev,
	double epsfcn,
	double[] diag,
	int mode,
	double factor,
	int nprint,
	ref int info,
	ref int nfev,
	double[] fjac,
	int ldfjac,
	int[] ipvt,
	double[] qtf,
	double[] wa1,
	double[] wa2,
	double[] wa3,
	double[] wa4,
	CancellationToken cancellationToken
)

Parameters

fcn  NLFitLMFunction
The user-supplied function that provides values to minimize.
xvec  Double
Parameter vector (input: initial estimate; output: final estimate).
fvec  Double
Output array that receives the evaluated function values at the output xvec.
ftol  Double
Tolerance on the relative reduction of the sum of squares.
xtol  Double
Tolerance on the relative change in the solution.
gtol  Double
Tolerance on the orthogonality between the function vector and the Jacobian columns.
maxfev  Int32
Maximum number of function evaluations.
epsfcn  Double
Step-length control for the forward-difference Jacobian approximation. If less than machine precision, machine precision is assumed.
diag  Double
Scaling factors for the variables (depending on mode).
mode  Int32
Scaling mode for variables (1: internal scaling; 2: use diag).
factor  Double
Initial step bound scaling factor.
nprint  Int32
Controls calling fcn with iflag = 0 for printing iterates.
info  Int32
Output status code.
nfev  Int32
On output, receives the number of calls to fcn.
fjac  Double
Jacobian array (m-by-n, column-major). On output contains the final QR information.
ldfjac  Int32
Leading dimension of fjac.
ipvt  Int32
Pivot indices defining permutation matrix.
qtf  Double
The first n elements of (Qᵀ)f.
wa1  Double
Working array of length n.
wa2  Double
Working array of length n.
wa3  Double
Working array of length n.
wa4  Double
Working array of length m.
cancellationToken  CancellationToken
Token to cancel the fit.
Remarks
This overload provides full control over the minimization process and auxiliary storage allocation. Prefer one of the simpler interfaces above unless you need that level of control.
See Also