Metropolis accept prob: which RV corresponds to which index?

I misunderstood your question :sweat_smile: array_slice is suppose to be a 1d array of all your free parameter. But in your case you are actually looking for something different - the MH acceptance ratio for each random variables.
There is no good way to read out this information as it is not currently saved in the trace, the best you can do is to read from the log.info like

CompoundStep
>Metropolis: [s]
>Metropolis: [x]
>Metropolis: [p]

which means the ordering will be s, x, p. To be on the safe side you can specific the ordering in compound step, see https://docs.pymc.io/notebooks/sampling_compound_step.html for more information

1 Like