-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Order of the multi-level parameter is not preserved when converted into InferenceData #138
Comments
Thanks for the issue! You're right, that doesn't look good. I just re-ran the Quickstart example on my machine, and |
Thanks for prompt reply... Here is my code leading to the said inconsistency...
But, this reordering issue applies to both of them..
|
The weird thing is that, as you inspect the
Output:
The output indicates that the order of the parameters is Then the question would be which one is at fault. I want to make sure which θ belongs to which school. The above inspection suggests that Do you have any idea? Thanks again... |
I think I found the possible reason. Comment from the maintainer of MCMCChains I raised this issue in MCMCChains github page. But I'm still not sure which one is confusing the order. |
Yes, that's absolutely right. Our code assumes that the entries of the variables are sorted in a natural order, but it looks like with Turing v0.16, that doesn't seem to be the case anymore. I'll push a fix so we no longer make assumptions about sorting. |
Thank you for this remarkable package...
As a newbie, I'm trying to replicate the centered_eight example from
arviz
homepage.I've obtained successfully the posterior sample from the model. (let's call this chain
chn_post
)And the I've created an
InferenceData
from this posterior byfrom_mcmcchains()
function. (=idata
)This
idata
must contain the above mentionedchn_post
asidata.posterior
.Below is the result of
summarystats
of the two version of the chain.As you noticed, the order of θ parameter is quite different between the two.
θ[1]
of thechn_post
corresponds toθ[5]
of theidata.posterior
.Which one is correct?
As
arviz
package provides this data aszdata=az.load_arviz_data("centered_eight")
, this will give us the correct one.This give the conclusion that
from_mcmcchains
may have disrupted the correct sequence oftheta
parameters.What do you think? I'm just confused....
Thanks
The text was updated successfully, but these errors were encountered: