Least Squares Optimizer.Use Sparse Jacobian Property
Gets or sets whether the Jacobian function receives a reusable sparse matrix to fill in.
Definition
Namespace: Numerics.NET.Optimization
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
C#
true for a sparse matrix; otherwise false. The default is false.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
public bool UseSparseJacobian { get; set; }Property Value
Booleantrue for a sparse matrix; otherwise false. The default is false.
Remarks
Set this property before calling FindMinimum() to avoid allocating a dense Jacobian at the start. Sparse matrices save memory when most derivatives are zero. Returning a sparse matrix from JacobianFunction automatically selects an iterative method for computing each optimization step.
The optimizer does not automatically identify zero derivatives when approximating the Jacobian numerically. Your Jacobian function must overwrite all entries that change, including entries that become zero. Requesting VarianceCovarianceMatrix still requires dense storage.
Exceptions
| Invalid | A calculation is in progress. |