Convergence test using estimated potential scale reduction (EPSR). It is a convergence metric that takes into account the variance of the means between chains and the variance of the samples within each chain.
More...
#include <diagnostics.hpp>
|
| | EpsrConvergenceCriteria (int numChains, int numDims) |
| | Initialise the convergence criteria. More...
|
| |
| void | update (uint id, const Eigen::VectorXd &sample) |
| | Update the convergence statistics for a new sample in a particular chain. More...
|
| |
| Eigen::ArrayXd | rHat () const |
| | Compute the estimated potential scale factor. A low value indicates that the chains are converging. More...
|
| |
| bool | hasConverged () const |
| | Check if all the chains have converged. The chains have converged if the potential scale reduction factor is below 1.1 for all dimensions. More...
|
| |
Convergence test using estimated potential scale reduction (EPSR). It is a convergence metric that takes into account the variance of the means between chains and the variance of the samples within each chain.
| stateline::mcmc::EpsrConvergenceCriteria::EpsrConvergenceCriteria |
( |
int |
numChains, |
|
|
int |
numDims |
|
) |
| |
|
inline |
Initialise the convergence criteria.
- Parameters
-
| numChains | The number of chains to be tested for convergence. |
| numDims | The number of dimensions in each state. |
| bool stateline::mcmc::EpsrConvergenceCriteria::hasConverged |
( |
| ) |
const |
|
inline |
Check if all the chains have converged. The chains have converged if the potential scale reduction factor is below 1.1 for all dimensions.
- Returns
- Whether all the chains have converged.
| Eigen::ArrayXd stateline::mcmc::EpsrConvergenceCriteria::rHat |
( |
| ) |
const |
|
inline |
Compute the estimated potential scale factor. A low value indicates that the chains are converging.
- Returns
- A vector containing the scale factors for each dimension.
| void stateline::mcmc::EpsrConvergenceCriteria::update |
( |
uint |
id, |
|
|
const Eigen::VectorXd & |
sample |
|
) |
| |
|
inline |
Update the convergence statistics for a new sample in a particular chain.
- Parameters
-
| id | The chain which has the new sample. |
| sample | The new sample to update the convergence statistics with. |
The documentation for this class was generated from the following file: