beanmachine.ppl.inference.vi.autoguide module

class beanmachine.ppl.inference.vi.autoguide.ADVI(queries: Iterable[beanmachine.ppl.model.rv_identifier.RVIdentifier], observations: Dict[beanmachine.ppl.model.rv_identifier.RVIdentifier, torch.Tensor], **kwargs)

Bases: beanmachine.ppl.inference.vi.autoguide.AutoGuideVI

Automatic Differentiation Variational Inference (ADVI).

ADVI automates construction of guides by initializing variational distributions as Gaussians and possibly bijecting them so the supports match.

See https://arxiv.org/abs/1506.03431.

static get_guide(query, distrib)
class beanmachine.ppl.inference.vi.autoguide.AutoGuideVI(queries: Iterable[beanmachine.ppl.model.rv_identifier.RVIdentifier], observations: Dict[beanmachine.ppl.model.rv_identifier.RVIdentifier, torch.Tensor], **kwargs)

Bases: beanmachine.ppl.inference.vi.variational_infer.VariationalInfer

VI with guide distributions automatically generated.

abstract static get_guide(query, distrib) beanmachine.ppl.model.rv_identifier.RVIdentifier
class beanmachine.ppl.inference.vi.autoguide.MAP(queries: Iterable[beanmachine.ppl.model.rv_identifier.RVIdentifier], observations: Dict[beanmachine.ppl.model.rv_identifier.RVIdentifier, torch.Tensor], **kwargs)

Bases: beanmachine.ppl.inference.vi.autoguide.AutoGuideVI

Maximum A Posteriori (MAP) Inference.

Uses Delta distributions to perform a point estimate of the posterior mode.

static get_guide(query, distrib)