Constrained multivariate Levenberg-Marquardt optimization
This module is imported as nmrglue.leastsqbound and can be called as such.
These functions are typically not used directly by users. They are called by high level functions.
Constrained multivariant Levenberg-Marquard optimization
Minimize the sum of squares of a given function using the Levenberg-Marquard algorithm. Contraints on parameters are inforced using variable transformations as described in the MINUIT User’s Guide by Fred James and Matthias Winkler.
Parameters:
func functions to call for optimization.
x0 Starting estimate for the minimization.
that parameter. Use None for one of min or max when there is no bound in that direction.
args Any extra arguments to func are places in this tuple.
Returns: (x,{cov_x,infodict,mesg},ier)
Return is described in the scipy.optimize.leastsq function. x and con_v are corrected to take into account the parameter transformation, infodic is not corrected.
Additional keyword arguments are passed directly to the scipy.optimize.leastsq algorithm.
Calculate the internal to external gradiant
Calculates the partial of external over internal