fitbenchmarking.controllers.horace_controller module
Implements a controller to the lm implementation in Herbert/Horace
- class fitbenchmarking.controllers.horace_controller.HoraceController(cost_func)
Bases:
fitbenchmarking.controllers.matlab_mixin.MatlabMixin
,fitbenchmarking.controllers.base_controller.Controller
Controller for fit in Herbert
- algorithm_check = {'all': ['lm-lsqr'], 'bfgs': [], 'conjugate_gradient': [], 'deriv_free': ['lm-lsqr'], 'gauss_newton': [], 'general': [], 'global_optimization': [], 'levenberg-marquardt': ['lm-lsqr'], 'ls': ['lm-lsqr'], 'simplex': [], 'steepest_descent': [], 'trust_region': []}
Within the controller class, you must initialize a dictionary,
algorithm_check
, such that the keys are given by:all
- all minimizersls
- least-squares fitting algorithmsderiv_free
- derivative free algorithms (these are algorithms that cannot use information about derivatives – e.g., theSimplex
method inMantid
)general
- minimizers which solve a generic min f(x)simplex
- derivative free simplex based algorithms e.g. Nelder-Meadtrust_region
- algorithms which emply a trust region approachlevenberg-marquardt
- minimizers that use the Levenberg-Marquardt algorithmgauss_newton
- minimizers that use the Gauss Newton algorithmbfgs
- minimizers that use the BFGS algorithmconjugate_gradient
- Conjugate Gradient algorithmssteepest_descent
- Steepest Descent algorithmsglobal_optimization
- Global Optimization algorithms
The values of the dictionary are given as a list of minimizers for that specific controller that fit into each of the above categories. See for example the
GSL
controller.
- cleanup()
Convert the result to a numpy array and populate the variables results will be read from.
- fit()
Run problem with Horace
- incompatible_problems = ['mantid']
A list of incompatible problem formats for this controller.
- setup()
Setup for Matlab fitting