NonLinearFit2LEVMAR_DIF Method |
Levenberg-Marquardt minimization using a finite-difference approximation of the Jacobian.
Namespace: Altaxo.Calc.RegressionAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntaxpublic static int LEVMAR_DIF(
NonLinearFit2FitFunction func,
double[] p,
double[] x,
int itmax,
double[] opts,
double[] info,
ref Object workingmemory,
double[] covar,
Object adata
)
Parameters
- func NonLinearFit2FitFunction
- Functional relation describing measurements. A p in R^m yields an estimated \hat{x} in R^n.
- p Double
- On input: initial parameter estimates. On output: the estimated solution.
- x Double
- Measurement vector.
- itmax Int32
- Maximum number of iterations.
- opts Double
-
Options [μ, ε1, ε2, ε3, δ]. Respectively the scale factor for the initial μ, stopping thresholds for
||J^T e||_∞, ||Dp||_2, and ||e||_2, and the step δ used for the Jacobian approximation.
If δ < 0, central differences are used (more accurate but slower).
- info Double
- Information regarding the minimization; see LEVMAR_DER(NonLinearFit2FitFunction, NonLinearFit2JacobianFunction, Double, Double, Double, Int32, Double, Double, Object, Double, Object) for layout.
- workingmemory Object
- Working memory object (reuse between calls); allocated if .
- covar Double
- Covariance matrix (m×m) corresponding to the LS solution; can be if not needed.
- adata Object
- Optional additional data passed through to func.
Return Value
Int32The number of iterations (≥ 0) if successful; -1 if failed.
Exceptions| Exception | Condition |
|---|
| ArithmeticException | Thrown when the number of measurements is smaller than the number of unknowns. |
See Also