You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
codes for solving minima and least squares fit problems
Golden search
POI LO SCRIVO
Gradient descent
POI LO SCRIVO
Gradient descent with momentum
POI LO SCRIVO
ADADELTA
POI LO SCRIVO
ADAM
POI LO SCRIVO
Levenberg–Marquardt
Consider our fit function f which depends on an independent variable and a set of parameters $\theta$, which is basically a vector of $\mathbb{R}^m$. We can expand f into Taylor series around a value of our parameters:
Which solves for $\delta$. To improve the convergence of the method, a damping parameter $\lambda$ is introduced and the equation becomes:
$$
(J^T W J - \lambda , \text{diag}(J^T W J)) \delta = J^T W (y - f(x, \theta))
$$
The value of $\lambda$ is changed depending on whether or not we get close to the right solution. If we are getting close we reduce its value, going towards the Gauss-Newton method; while if we move away we increase the value so that the algorithm behaves more like a descending gradient (of which there will be an example in the appendix). The question is: how do we know if we are getting close to the solution? We calculate:
if $\rho(\delta) > \varepsilon_1$ the move is accepted and we reduce \lambda otherwise we stay in the old position.
Another question to answer is: when did we arrive at convergence? we define:
If one of these quantities is less than a certain tolerance then the algorithm terminates. Now there remains one last question to answer and we can move on to the code. Since we need the errors on the fit parameters: how do we compute the covariance matrix? Just calculate: