Adding new Jacobians¶
This section describes how to add further methods to approximate the Jacobian within FitBenchmarking
In order to add a new Jacobian evaluation method, you will need to:
- Give the Jacobian a name using the following convention
<jac_method>and<num_method>. An example could bescipy_fdfor<jac_method>and2pointfor<num_method>which would call the SciPy’s 2-point finite difference approximation. - Create
fitbenchmarking/jacobian/<jac_method>_<num_method>_jacobian.py, which contains a new subclass ofJacobian. Then implement the methodeval(), which evaluates the Jacobian. The numerical method is set sequentially withinloop_over_jacobians()by using themethodattribute of the class. - Document the available Jacobians by:
- updating the docs for Fitting Options
- updating options via FitBenchmarking Options and Adding new Options
- updating any example files in the
exampledirectory
- Create tests for the Jacobian evaluation in
fitbenchmarking/jacobian/tests/test_jacobians.py.