@@ -74,7 +74,7 @@ def sample_smc(
74
74
The number of chains to run in parallel. If ``None``, set to the number of CPUs in the
75
75
system.
76
76
compute_convergence_checks : bool
77
- Whether to compute sampler statistics like Gelman-Rubin and ``effective_n``.
77
+ Whether to compute sampler statistics like ``R hat`` and ``effective_n``.
78
78
Defaults to ``True``.
79
79
return_inferencedata : bool, default=True
80
80
Whether to return the trace as an :class:`arviz:arviz.InferenceData` (True) object or a `MultiTrace` (False)
@@ -89,16 +89,9 @@ def sample_smc(
89
89
Determines the change of beta from stage to stage, i.e. indirectly the number of stages,
90
90
the higher the value of `threshold` the higher the number of stages. Defaults to 0.5.
91
91
It should be between 0 and 1.
92
- n_steps: int
93
- The number of steps of each Markov Chain. If ``tune_steps == True`` ``n_steps`` will be used
94
- for the first stage and for the others it will be determined automatically based on the
95
- acceptance rate and `p_acc_rate`, the max number of steps is ``n_steps``.
96
- tune_steps: bool
97
- Whether to compute the number of steps automatically or not. Defaults to True
98
- p_acc_rate: float
99
- Used to compute ``n_steps`` when ``tune_steps == True``. The higher the value of
100
- ``p_acc_rate`` the higher the number of steps computed automatically. Defaults to 0.85.
101
- It should be between 0 and 1.
92
+ correlation_threshold: float
93
+ The lower the value the higher the number of MCMC steps computed automatically.
94
+ Defaults to 0.01. It should be between 0 and 1.
102
95
Keyword arguments for other kernels should be checked in the respective docstrings
103
96
104
97
Notes
@@ -124,11 +117,11 @@ def sample_smc(
124
117
likelihoods of a sample at stage i+1 and stage i.
125
118
5. Obtain :math:`S_{w}` by re-sampling according to W.
126
119
6. Use W to compute the mean and covariance for the proposal distribution, a MVNormal.
127
- 7. For stages other than 0 use the acceptance rate from the previous stage to estimate
128
- `n_steps`.
129
- 8. Run N independent Metropolis-Hastings (IMH) chains (each one of length `n_steps`),
130
- starting each one from a different sample in :math:`S_{w}`. Samples are IMH as the proposal
131
- mean is the of the previous posterior stage and not the current point in parameter space .
120
+ 7. Run N independent MCMC chains, starting each one from a different sample
121
+ in :math:`S_{w}`. For the IMH kernel, the mean of the proposal distribution is the
122
+ mean of the previous posterior stage and not the current point in parameter space.
123
+ 8. The N chains are run until the autocorrelation with the samples from the previous stage
124
+ stops decreasing given a certain threshold .
132
125
9. Repeat from step 3 until :math:`\beta \ge 1`.
133
126
10. The final result is a collection of N samples from the posterior.
134
127
0 commit comments