Nonlinear Least Squares Optimization