R/mcmc-functions.R
mcmc_effective_sample_size.Rd
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 )
states |
|
---|---|
filter_threshold |
|
filter_beyond_lag |
|
name | 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()