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 function returns the vector of weighted residuals.
The initial value for optimization.
Parameters to be passed for fun
Additional optimization controls.
The solution to the non-linear least square problem, the same size as x0