Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Add support and tests for standalone generated quantities #416

Closed
ariddell opened this issue Jan 29, 2018 · 9 comments
Closed

Add support and tests for standalone generated quantities #416

ariddell opened this issue Jan 29, 2018 · 9 comments
Milestone

Comments

@ariddell
Copy link
Contributor

See stan-dev/stan#2434 . If there's an RStan example already PyStan could borrow that.

@ariddell ariddell added this to the Future milestone Jan 29, 2018
@mathDR
Copy link

mathDR commented Oct 15, 2018

Does this now work in 2.18? Is there an example showing this anywhere?

@bob-carpenter
Copy link

They're not in RStan yet. I'm not sure about CmdStan---@mitzimorris was going to plumb them through, but I don't know if that ever happened.

@mitzimorris
Copy link
Member

not plumbed through yet. good intentions, but no promises.

@lukerm
Copy link

lukerm commented Jan 16, 2019

This is a really interesting feature that I'd love to see in PyStan or RStan. It would allow us to see how the fitted model performs on "test" data.

Is there realistically anything I can do to help push this forward?

@mitzimorris
Copy link
Member

It would allow us to see how the fitted model performs on "test" data.

how would you use this feature to do this?

this feature will be easy to plumb through the interfaces as soon as stan-dev/stan#2725 is merged into stan.

@bob-carpenter
Copy link

bob-carpenter commented Jan 16, 2019 via email

@lukerm
Copy link

lukerm commented Jan 16, 2019

I have an example of how to do that using generated quantities in my repeated binary trials case study.

@bob-carpenter I think you're referring to this (interesting!) study? I see what you mean about having K, y and K_new, y_new (as train, test resp.).

Perhaps it's the lazy in me, but if you're interested in the generated quantities for both train and test datasets, then you'll end up repeating a lot of code in your Stan program. That's the situation I'm in. Even just for y_rep and y_rep_new it's a hassle (I think). However, if you could run only the generated quantities part of a trained Stan model, then all you'd need to do is pass in the test / unseen data. That would remove the need for _new suffix. I hope that makes sense.

Anyway, that's why I'm excited about this feature. I'll keep on the lookout for updates.

@mathDR
Copy link

mathDR commented Jul 5, 2020

Bumping this. Was this implemented?

@mitzimorris
Copy link
Member

not sure about PyStan, but it's available in CmdStanPy - there's doc and a notebook - https://cmdstanpy.readthedocs.io/en/latest/generate_quantities.html

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

No branches or pull requests

6 participants