jexplore.tools.covariance ========================= .. py:module:: jexplore.tools.covariance .. autoapi-nested-parse:: Covariance computation ====================== This modules provides the Basic functions for covariance computation. Functions --------- .. autoapisummary:: jexplore.tools.covariance.compute_cov Module Contents --------------- .. py:function:: compute_cov(samples, covs = None, cholesky = True, default = 0.001) Compute the covariance from a set of samples :param array samples: array of the past samples (nchains, dim, npoints). :param array covs: (nchain, dim, dim) array bearing one covariance matrices of all chains. Default: None, i.e. the covariance matrices are computed from samples. :param bool cholesky: if true returns the array of lower triangular matrices resulting from cholesky decomposition of the convariance matrices of all chains. Otherwise it returns the array of the covariance matrices. Default: True. :param float default: if covs is none and the samples only have 1 point the function will return a constant diagonal covariance for all chains. This parameters provides the value for the covariance diagonal terms in this case. Defaut: 1e-3. :return: array of the covariance matricaes of the chains or of their cholesky lower triangular matrices. :rtype: array