New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move predictions to Stan #501
Comments
Is this still blocked? |
Hopefully not, the upstream issue should have been fixed but I haven't yet checked to see if the data transfer is fast enough now for the scale we need. (Note that the fix is merged in github but not pushed to CRAN so testing will need to install rstan from github). |
Is this still planned or has this been implemented? |
@adrfantini #865 is the PR working on this, though it ran into some blockers a few months ago that we still need to figure out the best way around (still comes back to transferring large matrices from Stan into R being really slow). So there's still work to be done. |
In light of the change to support multiple stan backends (pystan and cmdstanpy), I think our previous strategy of trying to use stan's GQ block to try and handle predictions is going to be more complicated. I no longer think it will be worth the effort to try to move predictions into Stan (especially given the difficulties that we have already run into in trying to do this). There are a few features that this would have made easier (trend that saturates on one end, Poisson link function). I think we'll be better off just biting the bullet and implementing those in Stan/R/Py and have switches the way we do for linear vs. logistic trend. |
Right now we fit the model inside Stan but then make predictions in R and Py.
It would be beneficial for reducing code duplication across R and Py versions to do the predictions in Stan, including the simulation of future trend changes. It would probably also be faster. This Stan code does that:
Integrating this relies on being able to return the future trends from Stan to R, which is blocked on stan-dev/rstan#519.
The text was updated successfully, but these errors were encountered: