arviz_stats.base.array_stats.loo_expectation#
- array_stats.loo_expectation(ary, log_weights, kind='mean', chain_axis=-2, draw_axis=-1)#
Compute weighted expectation with PSIS-LOO-CV weights.
- Parameters:
- aryarray_like
Posterior predictive samples.
- log_weightsarray_like
Pre-computed PSIS log weights.
- kind
str, default “mean” Type of expectation: “mean”, “median”, “var”, “sd”, “circular_mean”, “circular_var”, “circular_sd”.
- chain_axis
int, default -2 Axis for chains.
- draw_axis
int, default -1 Axis for draws.
- Returns:
- expectationarray_like
Weighted expectation values.