Package minfx :: Module levenberg_marquardt
[hide private]
[frames] | no frames]

Module levenberg_marquardt

source code

Levenberg-Marquardt optimization.

This file is part of the minfx optimisation library.

Classes [hide private]
  Levenberg_marquardt
Functions [hide private]
 
levenberg_marquardt(chi2_func=None, dchi2_func=None, dfunc=None, errors=None, args=(), x0=None, func_tol=1e-25, grad_tol=None, maxiter=1000000.0, print_flag=0, print_prefix='', full_output=False)
Levenberg-Marquardt minimisation.
source code
Variables [hide private]
  __package__ = 'minfx'

Imports: float64, zeros, solve, Min


Function Details [hide private]

levenberg_marquardt(chi2_func=None, dchi2_func=None, dfunc=None, errors=None, args=(), x0=None, func_tol=1e-25, grad_tol=None, maxiter=1000000.0, print_flag=0, print_prefix='', full_output=False)

source code 

Levenberg-Marquardt minimisation.

Parameters:
  • chi2_func - User supplied chi-squared function which is run with the function parameters and args as options.
  • chi2_func - func
  • dchi2_func - User supplied chi-squared gradient function which is run with the function parameters and args as options.
  • dchi2_func - func
  • dfunc - User supplied function which should return a vector of partial derivatives of the function which back calculates values for the chi-squared function.
  • dfunc - func
  • errors - The experimental errors.
  • errors - numpy rank-1 array
  • args - A tuple containing the arguments to send to chi2_func and dchi2_func.
  • args - tuple
  • x0 - The initial function parameter values.
  • x0 - numpy rank-1 array
  • func_tol (float) - The function tolerance value. Once the function value between iterations decreases below this value, minimisation is terminated.
  • grad_tol (float) - The gradient tolerance value.
  • maxiter - The maximum number of iterations.
  • maxiter - int
  • print_flag (int) - A flag specifying how much information should be printed to standard output during minimisation. 0 means no output, 1 means minimal output, and values above 1 increase the amount of output printed.
  • print_prefix (str) - The text to add out to the front of all printouts.
  • full_output - A flag specifying what should be returned. If full_output is False, the parameter values and chi-squared value are returned as a tuple. If full_output is True, the parameter values, chi-squared value, number of iterations, and the warning flag are returned as a tuple.
  • full_output - bool