Convergence Checks (for multiple chains)
Module contains convergence checks functions that require data preprocessing. Most often this means having multiple chains.
- monte.convergence_checks.gelman_rubin(chains)[source]
Calculates Gelman-Rubin statistic (R-hat) for Markov chains
- Parameters:
chains (pd.DataFrame) – Markov chains used for the calculation
- Returns:
Gelman-Rubin statistic (R-hat)
- Return type:
float
- monte.convergence_checks.multivariate_gelman_rubin(chains)[source]
Calculates multivariate Gelman-Rubin statistic (R-hat) for Markov chains
- Parameters:
chains (pd.DataFrame) – Markov chains used for the calculation with dimensions (n_chains, n_samples, n_dim), where n_chains is the number of chains, n_samples is the number of samples per chain, and n_dim is the number of dimensions.
- Returns:
Multivariate Gelman-Rubin statistic (R-hat)
- Return type:
float