Closed ifangcheng closed 6 years ago
n_chains
stands for how many MCMC chains you are simulating in parallel. n_iters
represents how long you simulate, say, n_chains = 100, n_iters = 2000
means you simulate 100 chains for 2000 iterations.
ok, i see but n_chains = 100 n_iters = 2000 vs n_chains = 1000 n_iters = 200
normally, which one will be better?
They are independent of each other. In general, n_iters
should be sufficiently large so that the chain will mix. It only depends on the problem. For n_chains
, you can think of it as n_threads
in parallel programming. More is better, which means you can get more samples in the same amount of running time, but for large models, typically you cannot afford a too large n_chains
.
it seems like a kind of particle filter many thx!
You're welcome.
in examples: gaussian.py
Define HMC parameters
what is the diffetence between n_chains and n_iters?
it seems that both of them affect the final sampling quality?
what is exactly the difference if i change them as follows: n_chains = 100
n_iters = 2000