Computes the lower bound.

LowerBound(Pg, Omega, M, S, W, Wg, p, logSTW, logSTWg)

Arguments

Pg

Edge probability matrix (qxq).

Omega

Matrix with precision values common to all spanning trees (qxq).

M

Matrix of variational means (nxq).

S

Matrix of variational marginal variances (nxq).

W

Edges weight matrix.

Wg

Variational edges weight matrix.

p

Number of observed species.

logSTW

Log of the matrix tree run on the W matrix.

logSTWg

Log of the matrix tree run on the Wg matrix.

Value

A vector containing the different terms of the lower bound. More precisely :

  • J: value of the lower bound.

  • T1: expectation of log p(Z | T).

  • T2: expectation of the difference in log scale of the tree density and its variational approximation.

  • T3: Variational entropy of the latent gaussian parameters Z.