Open flaxter opened 9 years ago
No, it reads only the sample from sampling, NOT optimizing.
OK, thanks for the clarification. I guess this is a more general feature request, then, for there to be a common format between samples and point estimates, e.g. I've also noticed in RStan that the format of the return value from optimizing()
is totally different than what you get from extract()
. But sometimes I'd like to use the same code to make plots of each. And as we're anticipating things like VB and maximum marginal likelihood I think this will become even more useful!
@flaxter, it's not as easy as you might think. Creating a general format for different methods isn't easy. If you want to be part of that discussion, let's move it to the stan-dev list if you have some thoughts. We've given it some thought and couldn't come up with something general enough without having to over-engineer or it be over-constraining.
(you'll need permissions to post to stan-dev, so just email me and I'll give them to you if you want to have that discussion)
On Fri, Dec 12, 2014 at 11:45 AM, flaxter notifications@github.com wrote:
OK, thanks for the clarification. I guess this is a more general feature request, then, for there to be a common format between samples and point estimates, e.g. I've also noticed in RStan that the format of the return value from optimizing() is totally different than what you get from extract(). But sometimes I'd like to use the same code to make plots of each. And as we're anticipating things like VB and maximum marginal likelihood I think this will become even more useful!
— Reply to this email directly or view it on GitHub https://github.com/stan-dev/rstan/issues/123#issuecomment-66798685.
OK, sounds good. Marking as closed for now!
Can you reopen?
We should have a sensible message instead of the current behavior. On Dec 12, 2014 12:08 PM, "flaxter" notifications@github.com wrote:
OK, sounds good. Marking as closed for now!
— Reply to this email directly or view it on GitHub https://github.com/stan-dev/rstan/issues/123#issuecomment-66802346.
sampling() gives you a fit object with
optimizing() gives you a list, with
The one thing that's common (other than perhaps storing a link to the compiled model) is that they are organized collection of parameter values. In sampling you get K chains of N warmup and M sampling draws. In optimization you get one sequence of intermediate values and a single final estimate.
Any suggestions on how to unify all this in RStan 3?
At the very least, I'd suggest we have a way to get a common data structure for parameters out of both, though typically you want the mean or median or some tail stat for the ones from sampling(), so maybe ways to get that would be helpful (they may already exist, and even if they don't, they're pretty simple to create).
On Dec 12, 2014, at 12:11 PM, flaxter notifications@github.com wrote:
Reopened #123.
— Reply to this email directly or view it on GitHub.
I have a model that I run from CmdStan:
And then in R:
Gives: