I tried running the tutorial on Hidden Markov Models but encountered ERROR: ArgumentError: index m not found when running the following lines:
# Extract our m and s parameters from the chain.
m_set = c[:m].value.data
s_set = c[:s].value.data
I am not sure how this can be fixed, i.e. how does one access a set of parameters that belong to the same array in a chain object?
You can use namesingroup or group, see https://github.com/TuringLang/MCMCChains.jl#groups-of-parameters. I guess it is also more natural to use Array to obtain an array ouput, .value is an implementation detail (see https://github.com/TuringLang/MCMCChains.jl#exporting-chains).
Thanks, the following works:
m_set = Array(group(c, :m))
s_set = Array(group(c, :s))
There is still an issue with the plotting, but I think this will now generally be addressed in TuringLang/TuringTutorials#86.
Most helpful comment
Thanks, the following works:
There is still an issue with the plotting, but I think this will now generally be addressed in TuringLang/TuringTutorials#86.