Roughly speaking, "effective sample size" (ESS) is the size of an iid sample
with the same variance as state
.
mcmc_effective_sample_size(
states,
filter_threshold = 0,
filter_beyond_lag = NULL,
name = NULL
)
Tensor
or list of Tensor
objects. Dimension zero should index
identically distributed states.
Tensor
or list of Tensor
objects.
Must broadcast with state
. The auto-correlation sequence is truncated
after the first appearance of a term less than filter_threshold
.
Setting to NULL
means we use no threshold filter. Since |R_k| <= 1
,
setting to any number less than -1
has the same effect.
Tensor
or list of Tensor
objects. Must be
int
-like and scalar valued. The auto-correlation sequence is truncated
to this length. Setting to NULL
means we do not filter based on number of lags.
name to prepend to created ops.
Tensor
or list of Tensor
objects. The effective sample size of
each component of states
. Shape will be states$shape[1:]
.
More precisely, given a stationary sequence of possibly correlated random
variables X_1, X_2,...,X_N
, each identically distributed ESS is the number
such that
Variance{ N**-1 * Sum{X_i} } = ESS**-1 * Variance{ X_1 }.
If the sequence is uncorrelated, ESS = N
. In general, one should expect
ESS <= N
, with more highly correlated sequences having smaller ESS
.
Other mcmc_functions:
mcmc_potential_scale_reduction()
,
mcmc_sample_annealed_importance_chain()
,
mcmc_sample_chain()
,
mcmc_sample_halton_sequence()