Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 2.14 KB

hessian_extend.rst

File metadata and controls

55 lines (39 loc) · 2.14 KB

Adding new Hessians

This section describes how to add further methods to approximate the Hessian within FitBenchmarking

In order to add a new Hessian evaluation method, <hes_method>, you will need to:

  1. Create fitbenchmarking/hessian/<hes_method>_hessian.py, which contains a new subclass of ~fitbenchmarking.hessian.base_hessian.hessian. Then implement the method:

    • fitbenchmarking.hessian.base_hessian.Hessian.eval()

    The method is set sequentially within ~fitbenchmarking.core.fitting_benchmarking.loop_over_hessians() by using the method attribute of the class.

  2. Enable the new method as an option in fitting_option, following the instructions in options_extend. Specifically:
    • Amend the VALID_FITTING dictionary so that the element associated with the hes_method key contains the new <hes_method>.
  3. Document the available Hessians by:
  • adding to the list of available method options under hes_method in fitting_option.
  • updating any example files in the examples directory
  1. Create tests for the Hessian evaluation in fitbenchmarking/hessian/tests/test_hessians.py.

The ~fitbenchmarking.parsing.fitting_problem.FittingProblem and ~fitbenchmarking.jacobian.base_jacobian.Jacobian

When adding new Hessian, you will find it helpful to make use of the following members of the ~fitbenchmarking.parsing.fitting_problem.FittingProblem and subclasses of ~fitbenchmarking.jacobian.base_jacobian.Jacobian:

fitbenchmarking.parsing.fitting_problem

fitbenchmarking.parsing.fitting_problem.FittingProblem

fitbenchmarking.jacobian.base_jacobian

fitbenchmarking.jacobian.base_jacobian.Jacobian