Wiling to do a curve fitting within Stan, I came along Eigen’s Levenberg-Marquardt Algorithm.
I nice way to use the routines are shown in:
I would code my optimization function directly in the routine as shown in the stackoverflow example.
Now my question is:
Are the derivates required? In other words what does the function signature in Stan may look like?
var implementation required or is just implementing the
double version enough?
(I suppose the derivatives are not needed, since min f^2 force them be to 0)