Obtain the solution to minimize the sum of squared errors of the defined function fun
by levenberg-marquardt method. Adapted from PRACMA package.
nls_optimize.inner(fun, x0, ..., options)
The solution to the non-linear least square problem, the same size as x0
The function returns the vector of weighted residuals.
The initial value for optimization.
Parameters to be passed for fun
Additional optimization controls.