ILNumerics - Technical Application Development
Assembly: ILNumerics.Toolboxes.Optimization (in ILNumerics.Toolboxes.Optimization.dll) Version: 5.5.0.0 (5.5.7503.3146)
Jacobian estimate, matrix of size func().Length by x.Length
Efficient numerical estimation of the jacobian matrix (forward finite differences).
[ILNumerics Optimization Toolbox]
Namespace: ILNumerics.Toolboxes
Assembly: ILNumerics.Toolboxes.Optimization (in ILNumerics.Toolboxes.Optimization.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax
public static RetArray<double> jacobian_fast( OptimizationObjectiveFunction<double> func, InArray<double> x, InArray<double> Fx = null )
Parameters
- func
- Type: ILNumerics.ToolboxesOptimizationObjectiveFunctionDouble
Function to be evaluated - x
- Type: ILNumericsInArrayDouble
Vector giving the position of current evaluation - Fx (Optional)
- Type: ILNumericsInArrayDouble
[optional] Vector with results of the evaluation of the objective function
Return Value
Type: RetArrayDoubleJacobian estimate, matrix of size func().Length by x.Length
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | If x has a null component |
ArgumentOutOfRangeException | If f is not defined at x |
Remarks
This algorithm computes a good estimate of the jacobian matrix, concentrating on speed rather than on exactness.
On empty input x, an empty array will be returned.
[ILNumerics Optimization Toolbox]
Examples
Find the minimizer for f(x) = sin(x) + cos(x); x,f in R3, start searching at (1,1,1), using levenberg marquardt algorithm. The jacobian_fast(OptimizationObjectiveFunctionDouble, InArrayDouble, InArrayDouble) jacobian estimate is used for computing the jacobian in each step:
Array<double> Minimizer = Optimization.optimlevm(x => sin(x) + cos(x), zeros<double>(3, 1), jacobianFunc: Optimization.jacobian_fast);
See Also