Analytic sine VI and MF-VI examples#
Variational inference (VI) approximates a posterior distribution by optimizing a Gaussian approximation. Multifidelity VI (MF-VI) uses additional inexpensive surrogate evaluations to reduce estimator cost.
These examples infer seven coefficients in a one-dimensional sine-series problem with a known Gaussian posterior, allowing the numerical results to be compared with the exact solution.
Diagonal Gaussian posterior#
Equispaced observations produce a nearly diagonal posterior. This example compares mean-field VI and MF-VI with the exact posterior.
Run python examples/vi_mf_vi_demo/diagonal_example.py.
Convergence toward the exact posterior.#
Exact and approximate posterior marginals.#
Source and further details#
To regenerate the figures, run
python examples/vi_mf_vi_demo/generate_docs_media.py.