Get intermediate results in pystan


I am relatively new to Stan. Say, I am running Stan with 10000 iterations, is it possible to print results in intermediate stages(like iterations: 500, 1000, …etc.). Or is it possible to know how many iterations are enough for the sampling algorithm to converge?


Currently, without touching C++ code answer is no. (At least I can’t think a way to do it)

In future, maybe. When it is possible to continue sampling from the previous state. (Or I have misunderstood the concept behind mass matrix initialization

There has been some discussion the discourse should one do that, but can’t find it right now.


So, the only way to do it would be to run it multiple times with different iterations?


Basically yes.

PyStan 3 / httpstan might change this (intermediate results)

cc @ariddell