cgarling / StarFormationHistories.jl

Fitting astrophysical star formation histories via CMD modelling.
MIT License
3 stars 0 forks source link

gradient of loglikelihood #4

Closed cgarling closed 1 year ago

cgarling commented 1 year ago

We might be able to increase the efficiency of the gradient of the loglikelihood computation in fitting.jl if we define a custom method that derives the full gradient (so every partial) simultaneously and builds a dense representation of (data ./ composite). As it is, when we calculate each partial separately it recomputes for every partial.

Our solves are still quite fast but I think this would be an improvement.

cgarling commented 1 year ago

This has been implemented in ∇loglikelihood!; looks like up to a 20% performance improvement in some cases.