Interface to Lsqnonlin
paulstapor opened this issue · 0 comments
paulstapor commented
Currently, lsqnonlin can be used within Pesto by providing the objective function in a very special form: It needs to be callable as
[residuals] = objectiveFunction(...)
[residuals, Jacobian] = objectiveFunction(...)
[residuals, ~, log-likelihood] = objectiveFunction(...)
The reason is that lsqnonlin needs residuals, bur from this, the likelihood is often not directly computable. This is a problem, if results need to be compared with fmincon results, e.g. for a study or similar things.
The current implementation works, but is very non-intuitive. Does anyone have an idea how to improve it?