# outliers - Chain outlier tests¶

 identify_outliers Determine which chains have converged on a local maximum much lower than the maximum likelihood.

Chain outlier tests.

bumps.dream.outliers.identify_outliers(test, llf, x=None)[source]

Determine which chains have converged on a local maximum much lower than the maximum likelihood.

test is the name of the test to use (one of IQR, Grubbs, Mahal or none). IQR rejects any chains with mean log likelihood more than than twice the inter-quartile range below the value of the 25% quartile. The Grubbs method uses a t-test to determine which chains have a mean log likelihood extremely far below the mean across all the chains. The Mahal test looks at the head of the chain with the worst mean log likelihood and marks it as an outlier if it is far from the centroid of the population. This assumes that the posterior is approximately gaussian, which is not true in general.

llf is a set of log likelihood values for all chains, which is an array of shape (chain len, num chains)

x is the current population with one point for each each, which is an array of shape (num chains, num vars). This is only used for the Mahal test.

Returns an integer array of outlier indices.