fitbenchmarking.controllers.gsl_controller module
Implements a controller for GSL https://www.gnu.org/software/gsl/ using the pyGSL python interface https://sourceforge.net/projects/pygsl/
- class fitbenchmarking.controllers.gsl_controller.GSLController(cost_func)
Bases:
fitbenchmarking.controllers.base_controller.Controller
Controller for the GSL fitting software
- algorithm_check = {'all': ['lmsder', 'lmder', 'nmsimplex', 'nmsimplex2', 'conjugate_pr', 'conjugate_fr', 'vector_bfgs', 'vector_bfgs2', 'steepest_descent'], 'bfgs': ['vector_bfgs', 'vector_bfgs2'], 'conjugate_gradient': ['conjugate_fr', 'conjugate_pr'], 'deriv_free': ['nmsimplex', 'nmsimplex2'], 'gauss_newton': [], 'general': ['nmsimplex', 'nmsimplex2', 'conjugate_pr', 'conjugate_fr', 'vector_bfgs', 'vector_bfgs2', 'steepest_descent'], 'global_optimization': [], 'levenberg-marquardt': ['lmder', 'lmsder'], 'ls': ['lmsder', 'lmder'], 'simplex': ['nmsimplex', 'nmsimplex2'], 'steepest_descent': ['steepest_descent'], 'trust_region': ['lmder', 'lmsder']}
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 GSL
- jacobian_enabled_solvers = ['lmsder', 'lmder', 'conjugate_pr', 'conjugate_fr', 'vector_bfgs', 'vector_bfgs2', 'steepest_descent']
Within the controller class, you must define the list
jacobian_enabled_solvers
if any of the minimizers for the specific software are able to use jacobian information.jacobian_enabled_solvers
: a list of minimizers in a specific
software that allow Jacobian information to be passed into the fitting algorithm
- setup()
Setup for GSL