TuringLang / AbstractMCMC.jl

Abstract types and interfaces for Markov chain Monte Carlo methods
https://turinglang.org/AbstractMCMC.jl
MIT License
78 stars 18 forks source link

Correct syntax for chainscat and chainsstack #122

Open astro-kevin opened 1 year ago

astro-kevin commented 1 year ago

I'm not sure what's the correct syntax for the functions chainscat and chainsstack. I tried calling chainscat(a,b) and chainsstack([a,b]) and both return an error. (As an aside, is the only difference between the two one takes chains as arguments and one takes a vector of chains?) In my test code, both a and b are MCMCChains objects.

cpfiffer commented 1 year ago

Could you paste the error you're experiencing?

On Tue, May 23, 2023, at 8:22 AM, astro-kevin wrote:

I'm not sure what's the correct syntax for the functions chainscat and chainsstack. I tried calling chainscat(a,b) and chainsstack([a,b]) and both return an error. (As an aside, is the only difference between the two one takes chains as arguments and one takes a vector of chains?) In my test code, both a and b are MCMCChains objects.

— Reply to this email directly, view it on GitHub https://github.com/TuringLang/AbstractMCMC.jl/issues/122, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADHITX4W724DJTDPPHUTL3XHTI5FANCNFSM6AAAAAAYMCAPTA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

astro-kevin commented 1 year ago

Here is the error: ERROR: ArgumentError: chain ranges differ. I think that's because of the burn in which is discarded. However, I'm just not really understanding how this works because the object which it returns when it does work (when I'm stacking any except the first chain), it returns an object with multiple chains, rather than one long chain as I expect. Are the stats presented on the multiple chains equivalent to the one with very many samples?

cpfiffer commented 1 year ago

For this it might be more helpful if you posted the whole script you're using, or, even better, a minimum working example -- is that something you're able to do?