Commit 998d3b9e by Philipp Arras

Docs

parent 1ca27aa8
 ... ... @@ -25,42 +25,49 @@ class MetricGaussianKL(Energy): """Provides the sampled Kullback-Leibler divergence between a distribution and a Metric Gaussian. A Metric Gaussian is used to approximate some other distribution. It is a Gaussian distribution that uses the Fisher Information Metric of the other distribution at the location of its mean to approximate the variance. In order to infer the mean, the a stochastic estimate of the A Metric Gaussian is used to approximate another probability distribution. It is a Gaussian distribution that uses the Fisher information metric of the other distribution at the location of its mean to approximate the variance. In order to infer the mean, a stochastic estimate of the Kullback-Leibler divergence is minimized. This estimate is obtained by drawing samples from the Metric Gaussian at the current mean. During minimization these samples are kept constant, updating only the mean. Due to the typically nonlinear structure of the true distribution these samples have to be updated by re-initializing this class at some point. Here standard parametrization of the true distribution is assumed. sampling the Metric Gaussian at the current mean. During minimization these samples are kept constant; only the mean is updated. Due to the typically nonlinear structure of the true distribution these samples have to be updated eventually by intantiating `MetricGaussianKL` again. For the true probability distribution the standard parametrization is assumed. Parameters ---------- mean : Field The current mean of the Gaussian. Mean of the Gaussian probability distribution. hamiltonian : StandardHamiltonian The StandardHamiltonian of the approximated probability distribution. Hamiltonian of the approximated probability distribution. n_samples : integer The number of samples used to stochastically estimate the KL. Number of samples used to stochastically estimate the KL. constants : list A list of parameter keys that are kept constant during optimization. List of parameter keys that are kept constant during optimization. Default is no constants. point_estimates : list A list of parameter keys for which no samples are drawn, but that are optimized for, corresponding to point estimates of these. List of parameter keys for which no samples are drawn, but that are (possibly) optimized for, corresponding to point estimates of these. Default is to draw samples for the complete domain. mirror_samples : boolean Whether the negative of the drawn samples are also used, as they are equaly legitimate samples. If true, the number of used as they are equally legitimate samples. If true, the number of used samples doubles. Mirroring samples stabilizes the KL estimate as extreme sample variation is counterbalanced. (default : False) extreme sample variation is counterbalanced. Default is False. _samples : None Only a parameter for internal uses. Typically not to be set by users. Notes ----- For further details see: Metric Gaussian Variational Inference (FIXME in preparation) Note ---- The two lists `constants` and `point_estimates` are independent from each other. It is possible to sample along domains which are kept constant during minimization and vice versa. See also -------- Metric Gaussian Variational Inference (FIXME in preparation) """ def __init__(self, mean, hamiltonian, n_samples, constants=[], ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!