Skip to contents

Perform variational inference for logistic regression model

Usage

vb_logistic(
  X,
  y,
  mu0,
  Sigma0,
  mu_init,
  Sigma_init,
  tol = 1e-08,
  maxiter = 1000L,
  maxiter_jj = 25L,
  alg = "jj",
  verbose = FALSE
)

Arguments

X

The design matrix

y

The response vector

mu0

The prior mean for beta paramter

Sigma0

The prior variance for beta parameter

mu_init

Initial value for mu for optimisation.

Sigma_init

Initial value for Sigma for optimisation.

tol

The tolerance level to assess convergence

maxiter

The maximum number of iterations

maxiter_jj

The maximum number of Jaakkola-Jordan iterations to initialise estimation

alg

The algorithm used for final estimation of variational parameters.

verbose

Print trace of the lower bound to console. Default is FALSE. Must be one of "jj", "sj", "kmw".