You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For plotting one often wishes to just have an array, rather than the chains object in the posterior. It would be good to pull this out more conveniently
Current implementation
# given: posterior = get_posterior(mcmc, chain)
posterior_samples =vcat([get_distribution(posterior)[name] for name inget_name(posterior)]...) #samples are columns
constrained_posterior_samples =mapslices(x ->transform_unconstrained_to_constrained(posterior, x), posterior_samples, dims =1)
For plotting one often wishes to just have an array, rather than the chains object in the posterior. It would be good to pull this out more conveniently
Current implementation
Solution:
Firstly, we don't need mapslices as
transform_unconstrained_to_constrained(posterior, posterior_samples)
should work? see here
Perhaps we can just wrap the first part up like:
PS we should also avoid
vcat(X...)
where possibleThe text was updated successfully, but these errors were encountered: