Reference / binference.diagnostics.psis

binference.diagnostics.psis

binference.diagnostics.psis(log_weights)[source]

Pareto-smoothed importance sampling.

Parameters:
log_weightsarray_like (n,)

Unnormalised log importance ratios.

Returns:
log_weights_smoothed(n,) array

Normalised (logsumexp == 0) smoothed log-weights.

k_hatfloat

Estimated Pareto shape: the estimate is reliable below psis_threshold() of the number of weights (0.7 from about 2,000); -inf for equal weights, which have no tail.