How is the order in which the variables appear in mcmc.get_samples() decided? I wish to perform some experiment and compare their performance across different PPL’s like Julia, Stan, etc. For example, in Stan the order of the appearance of the variables in samples follow the same order as in parameter block of model declaration.
presumably you mean the order of elements within a particular named latent variable and not the order among named latent variables?
I want the order among the named latent variable.
Based on observation, It seems that the order of latent variables returned in mcmc.get_sample() and mcmc.print_summary() is alphabetical. Could you (@martinjankowiak), please confirm?
why does the order matter? the returned object is a dictionary of key/value pairs. you can access in whatever order you choose.
afaik the order should be the order the latent variables appear in the program but we make no guarantees about the order since, again, we return a dictionary which isn’t (at least traditionally) an ordered object.