blackjax.smc.ess#
All things related to SMC effective sample size
Functions#
|
|
|
Compute the effective sample size. |
|
ESS solver for computing the next increment of SMC tempering. |
Module Contents#
- log_ess(log_weights: blackjax.types.Array) float [source]#
Compute the effective sample size.
- Parameters:
log_weights (1D Array) – log-weights of the sample
- Returns:
log_ess – The logarithm of the effective sample size
- Return type:
- ess_solver(logdensity_fn: Callable, particles: blackjax.types.ArrayLikeTree, target_ess: float, max_delta: float, root_solver: Callable)[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 (SMCState) – Current state of the tempered SMC algorithm
target_ess (float) – The relative ESS targeted for the next increment of SMC tempering
max_delta (float) – Max acceptable delta increment
root_solver (Callable, optional) – A solver to find the root of a function, takes a function f, a starting point delta0, a min value min_delta, and a max value max_delta. Default is BFGS minimization of f ** 2 and ignores min_delta and max_delta.
- Returns:
delta – The increment that solves for the target ESS
- Return type: