jexplore.tools.diagnostic ========================= .. py:module:: jexplore.tools.diagnostic .. autoapi-nested-parse:: Diagnostic tool for assessing the convergence of the MCMC sampling. Functions --------- .. autoapisummary:: jexplore.tools.diagnostic.gelman_rubin_statistic jexplore.tools.diagnostic.auto_correlation_length Module Contents --------------- .. py:function:: gelman_rubin_statistic(samples, ntemp=1) Return square root of Gelman-Rubin statistic R. Assess the convergence by comparing the variance between the chains and the variance in the chains. :param array samples: (nchain, dim, npoints) array with nchain equal to nwalker if ntemp=1 (default) or nchain equal nwalker x ntemp. :param int ntemp: return R per temperature is ntemp > 1 :return: (ntemp, ndim) array of the statistic for each dimension (and temperature) :rtype: array .. py:function:: auto_correlation_length(samples) Return auto correlation length from emcee. :param array samples: (nchain, dim, npoints) array with nchain equal to nwalker :return: :rtype: array