Computes the maximization step of the algorithm

Mstep(M, S, Pg, Omega, W, Wg, p, logSTW, logSTWg, trackJ = FALSE)

Arguments

M

Matrix of variational means.

S

Matrix of variational marginal variances.

Pg

Matrix of edges probabilities.

Omega

Matrix gathering precision terms common to all spanning tree structures.

W

Edges weights matrix.

Wg

Variational edge weights matrix.

p

Number of observed species.

logSTW

Log of the Matrix Tree quantity of the W matrix.

logSTWg

Log of the Matrix Tree quantity of the Wg matrix.

trackJ

Boolean for evaluating the lower bound at each parameter update.

Value

Quantities required by the VEstep function:

  • W: edge weights matrix.

  • Omega: Matrix gathering precision terms common to all spanning tree structures.

  • LB: lower bound values.

  • logSTW: log of the Matrix Tree quantity of the W matrix.

  • max.prec: boolean tracking the reach of maximal precision during computation.