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

Module levenberg_marquardt

source code

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, full_output=0, print_flag=0, print_prefix='')
Levenberg-Marquardt minimimisation.
source code

Imports: solve_linear_equations, Float64, zeros, 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, full_output=0, print_flag=0, print_prefix='')

source code 
Levenberg-Marquardt minimimisation.

Function options
~~~~~~~~~~~~~~~~

chi2_func:  User supplied chi-squared function which is run with the function parameters and
args as options.

dchi2_func:  User supplied chi-squared gradient function which is run with the function
parameters and args as options.

dfunc:  User supplied function which should return a vector of partial derivatives of the
function which back calculates values for the chi-squared function.

params:  The initial function parameter values.

errors:  The experimental errors.

args:  A tuple containing the arguments to send to chi2_func and dchi2_func.

maxiter:  The maximum number of iterations.

full_output:  A flag specifying what should be returned.


Output
~~~~~~

If full_output = 0, the parameter values and chi-squared value are returned as a tuple.

If full_output = 1, the parameter values, chi-squared value, number of iterations, and the
warning flag are returned as a tuple.