blackjax.smc.ess#
All things related to SMC effective sample size
Functions#
|
Compute the effective sample size. |
|
Compute the logarithm of the effective sample size. |
|
ESS solver for computing the next increment of SMC tempering. |
Module Contents#
- ess(log_weights: blackjax.types.Array) float | blackjax.types.Array[source]#
Compute the effective sample size.
- Parameters:
log_weights (Array) – Log-weights of the sample, shape (n_particles,).
- Returns:
ess – The effective sample size.
- Return type:
float | Array
- log_ess(log_weights: blackjax.types.Array) float | blackjax.types.Array[source]#
Compute the logarithm of the effective sample size.
- Parameters:
log_weights (Array) – Log-weights of the sample, shape (n_particles,).
- Returns:
log_ess – The logarithm of the effective sample size.
- Return type:
float | Array
- ess_solver(logdensity_fn: Callable, particles: blackjax.types.ArrayLikeTree, target_ess: float | blackjax.types.Array, max_delta: float | blackjax.types.Array, root_solver: Callable) float | blackjax.types.Array[source]#
ESS solver for computing the next increment of SMC tempering.
- Parameters:
logdensity_fn (Callable) – The log probability function we wish to sample from.
particles (ArrayLikeTree) – Current particles of the tempered SMC algorithm.
target_ess (float | Array) – Target effective sample size (ESS) for the next increment of SMC tempering.
max_delta (float | Array) – Maximum acceptable delta increment.
root_solver (Callable) – A solver to find the root of a function. Signature is root_solver(fun, min_delta, max_delta). Use e.g. dichotomy from blackjax.smc.solver.
- Returns:
delta – The increment that solves for the target ESS.
- Return type:
float | Array