legend-exp / LegendSpecFits.jl

LEGEND tools to fit spectra
Other
3 stars 7 forks source link

Gradient-based minimization and gradients #66

Open LisaSchlueter opened 1 month ago

LisaSchlueter commented 1 month ago

The default algorithm of the Optim minimizer is Nelder-Mead(), which is a gradient-free method. I'd like to explore gradient-based algorithms, such as GradientDescent() or LBFGS(). Motivation:

When going to a gradient-based algorithm, it would make sense to provide the minimizer with the analytical gradients. @oschulz do you have experience on how to do that in julia?

oschulz commented 4 weeks ago

In principle we can used automatic differentiation (ForwardDiff if it's just a handful of parameters) to enable LBFGS and so on. But we have to make sure the Likelihood is differentiable in principle, but for fitting a function to a histograms that's typically not a problem.

fhagemann commented 2 weeks ago

This does not work for multithreaded code.