Appendici
103
Appendice A
Diagramma di flusso
104
Appendice B
Algoritmo PLF - pseudo codice
Algorithm 1 PLFit: algoritmo Levenberg-Marquardt che realizza il fitting con penalizzazione [34]
1: function PLFit(φ0,xem,xreg,ωreg)
2: Set the parameters τ and to small values, e.g. τ = 10−3, = 10−9
3: Set initials: v = 2, φ = φ0
4: Calculate the gradient g and Hessian H for eq. 5.11
5: µ= τmaxp([Hpp])
6: for k = 1...maxit do
7: Get φnew by solving the quadratic optimization in 5.12
8: if ||φnew− φ|| ≥ (||φ|| + ) then return φ and x(φ)
9: elseρ = q˜q(φ)−˜q(φ)(φ)−q(φ)newnew))
10: if ρ > 0 then φ = φnew
11: Update g and H again
12: µ= µmax(13,1 − (2p − 1)3); v = 2
13: elseµ = µv; v = 2v return φ and x(φ)
105