(This is mainly for @charlesm93)
There’s something weird happening with the algebraic solver. I keep getting nonsensical error
Informational Message: The current Metropolis proposal is about to be rejected because of the following issue: Exception: algebra_solver: the norm of the algebraic function is: 1.05681e-06 but should be lower than the function tolerance: 1e-06. Consider increasing the relative tolerance and the max_num_steps. (in '/Users/ds921/Downloads/gplainstan/gp_poisson_latent_la.stan' at line 44)
There are two things:
- I think it should say “consider decreasing relative tolerance”
- I looked at the code and lines 172-175 set the relative tolerance and the max step length, but don’t set the function tolerance. However, lines 186-195 throw an error if the function tolerance isn’t satisfied. Why isn’t the nonlinear solver trying to achieve both tolerances?
My expected behaviour from reading the docs is that the non-linear solver will try to satisfy both of these conditions, although it might fail.
At the very least, the manual should be updated to reflect that the solver isn’t trying to satisfy one condition with instructions on how to turn it off.
In the current situation, you need to have a solid upper bound for the norm of the function at the initial value (which is basically impossible if the function depends on parameters) to be able to set the relative tolerance in such a way that the absolute tolerance can be satisfied.