Skip to content
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

Port C++ psis code to loo? #260

Open
SteveBronder opened this issue Mar 14, 2024 · 1 comment
Open

Port C++ psis code to loo? #260

SteveBronder opened this issue Mar 14, 2024 · 1 comment

Comments

@SteveBronder
Copy link

In Stan we have a lot of the code for psis sampling available as C++.

https://github.com/stan-dev/stan/blob/develop/src/stan/services/pathfinder/psis.hpp

It should be a good bit faster. How much time do you ballpark the psis sampling takes / would it be a lot better if it was faster in R?

We could do this by writing some Rcpp to call the functions in Stan. However this would be a large dependency to add so if the current speed is fine then idt we should worry about this too much.

But if speed is an issue happy to put this on my plate to do at some point

@jgabry
Copy link
Member

jgabry commented Jul 3, 2024

Thanks @SteveBronder, just saw this (finally catching up on GitHub issues!). Yeah I think the only reason not to do this would be adding the dependency on Rcpp. I guess, like you said, it all depends on whether the added speed would be a game changer. PSIS smoothing is definitely the biggest bottleneck when running loo(), but I've never tried comparing the R and C++ versions to see how much of a speedup there would be. @avehtari what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants