viabel.divergence_bound¶
-
viabel.
divergence_bound
(log_weights, *, alpha=2.0, log_norm_bound=None, return_log_norm_bound=False)[source]¶ Compute a bound on the alpha-divergence.
Compute error and distance bounds between distribution p and q using samples from q.
- Parameters
- log_weightsarray-like of int, shape (n_samples,)
log weights log p(x_i) - log q(x_i), where x_i is sampled from q and p may be an unnormalized distribution.
- alphafloat
order of the Renyi divergence. Must be greater than 1
- log_norm_boundfloat
Bound on the log normalization constant for p (the log marginal likelihood when p is the unnormalized log posterior).
- Returns
- dalphafloat
Bound on the alpha-divergence.