For example, if I called this code:
trace = pm.sample(draws=2500, tune=1000, cores=1)
It reports that the length of trace[‘theta’][:, 0] as 5000, which is 2x the draws (2500). I was wondering why that was the case.
Sounds like you’re running two chains. By default:
If [chains=]None, then set to either cores or 2, whichever is larger. For SMC the number of chains is the number of draws.
So you’re doing 2500 draws each from 2 chains, so 5000 draws total. Set
chains=1 to have it match; or
draws=int(N/nchain), chains=nchain if you want to be able to check for consistent sampling across restarts.