I use pystan 2.18.0 and would like to optimizing a model over different subset of a data set. However sometimes the optimizer complains:
Optimization terminated with error:
Line search failed to achieve a sufficient decrease, no more progress can be made
When this happens, pystan raises a RuntimeError and does not return fitted parameters.
My current workaround is ignore the error, but I found it would leave “holes” in the subset map.
My problem is, is there a way to retrieve the fitted parameters. even if it does not reach the criterion for convergence? Sometimes the function just get too “flat” or the tol_param just set to be too small. Either case, the best-fitted parameters may be still of use.