Utilities#
Numerical helpers shared by every setting.
Tie-breaking selection#
Index of a maximum of |
|
Index of a minimum of |
|
Maximum of |
Divergences#
Parametric divergences for the usual one-parameter exponential families, plus the non-parametric \(K_{\inf}\) used by the batched IMED variants. Pick the one matching your rewards — an index algorithm is asymptotically optimal only for the right divergence.
Kullback-Leibler divergence between two Bernoulli distributions. |
|
Kullback-Leibler divergence between two Gaussians of equal variance. |
|
Kullback-Leibler divergence between two Poisson distributions. |
|
Kullback-Leibler divergence between two exponential distributions. |
|
Non-parametric divergence \(K_{\inf}\) between an empirical distribution and the set of distributions with mean above a threshold, evaluated using the concave dual. |
Sampling#
Draw one index from a categorical distribution. |
|
Deterministic distribution concentrated on a single value. |
Setting validation#
Checks that a setting folder follows the layout described in Contributing.
Validate a complete setting folder. |
|
Check required files and folders. |
|
Check Environment class and API. |
|
Check Agent class. |
|
Check Interaction class and API. |
|
Validate envs/environments.yaml files. |
|
Import a python module from a file path. |
|
Print one check result and pass its verdict through. |