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, at least
PSIS_MIN_WEIGHTSof them;-infand NaN get zero weight, and+infis refused.
- 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);-inffor equal weights, which have no tail;infwhen the tail cannot be fitted (seePSIS_MIN_WEIGHTS), and then the weights are not smoothed.