JuliaExtremes / IDFCurves.jl

MIT License
0 stars 0 forks source link

Problem when the shape parameter is initialized at 0 #28

Open AugustePaoli99 opened 7 months ago

AugustePaoli99 commented 7 months ago

If $\xi$ is initialized at 0, and the function fit_mle() (that uses gradient) is used to estimate the parameters, then $\xi$ will stay equal to $0$.

AugustePaoli99 commented 7 months ago

A quick fix would be inside fit_mle() : if xi = 0 then xi = 0.01.

jojal5 commented 6 months ago

@AugustePaoli99 I would initialize instead at \xi = 2*eps().

AugustePaoli99 commented 6 months ago

Sounds good !

AugustePaoli99 commented 6 months ago

@jojal5, it doesn't work with \xi = 2*eps(), for now I went with 0.0001 (worked well in IDF.jl). I made a commit on the related branch. The bug I'm talking about with eps() is described at the end of script.jl. Is it okay to initialize at 0.0001 or does it rise any problem ? If yes, can I merge into dev branch ?

jojal5 commented 6 months ago

Je me demande si ce n'est pas un signe que quelque chose de plus sérieux se cache. Est-ce que ça fonctionne avec 10*eps() ? On dirait que le problème vient dans une discontinuité numérique dans la logpdf.

AugustePaoli99 commented 6 months ago

A faire : vérifier ce qu'il se passe lorsqu'on essaye une optimisation avec gradient puis qu'on se rabat sur une optimisation sans gradient en cas d'échec. Je pourrai tester ça dès que le fitting aura été implémenté de manière générique (y-compris pour les modèles marginaux)