pysolvegn.build_numerical_jacobian#

build_numerical_jacobian(residual_func, epsilon=1e-08)[source]#

Build a Jacobian function for the Gauss-Newton optimization by computing the numerical derivatives of the residual function with respect to the parameters using finite differences.

Parameters:
  • residual_func (Callable) – A function that computes the residuals for a given set of parameters. The function should take a 1D array of parameters as input and return a 1D array of residuals.

  • epsilon (Real, optional) – A small perturbation value used for finite difference approximation of the Jacobian. Default is 1e-8.

Returns:

jacobian_func – A function that computes the Jacobian matrix for a given set of parameters. The function should take a 1D array of parameters as input and return a 2D array representing the Jacobian matrix.

Return type:

Callable

Version#

  • 0.0.1: Initial version.

  • 0.0.2: Renamed from build_jacobian to build_numerical_jacobian for clarity.