fit_ncvi: Non-conjugate variational inference

View source: R/fit_ncvi.R

fit_ncviR Documentation

Non-conjugate variational inference

Description

General form of wrapper function for a variational inference algorithm that may include both conjugate and non-conjugate conditional distributions.

Usage

fit_ncvi(
  data,
  init,
  update_pars,
  elbo,
  options = list(max_iter = 100, elbo_delta = 1e-04, verbose = TRUE, fixed_iter = FALSE,
    short_out = FALSE),
  ...
)

Arguments

data

List of observed or known variables used by the differentials or update functions

init

List of initial values for unknown variables updated by the algorithm

update_pars

Function to carry out the update to pars at each step

elbo

Function to calculate the ELBO for the model

options

List of options. Should include positive real 'elbo_delta', the threshold change in ELBO to terminate the algorithm

...

Additional arguments to be passed to update_pars(), e.g. differentials


dcannonwalker/ncvi documentation built on Dec. 9, 2022, 6:45 p.m.