stan-dev / stan-dev/loo

Port C++ psis code to loo?

Open
#260 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
157
Forks
38
Avg merge
4d 16h
Merged PRs (30d)
2

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by measuring how much time PSIS sampling currently takes in the loo R package, then inspect Stan's src/stan/services/pathfinder/psis.hpp implementation. Compare the potential speedup against the cost of adding an Rcpp and Stan dependency; done means establishing whether the port is worthwhile and defining an implementation approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, r
Domain
performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.