Research Article

Bayesian Inference for Nonnegative Matrix Factorisation Models

Algorithm 1

Variational nonnegative matrix factorisation.
(1) Initialise:
Lt(0)=Et(0)~𝒢(·;At,Bt./At)Lv(0)=Ev(0)~𝒢(·;Av,Bv./Av)
(2) for n=1 MAXITER do
(3) Source sufficient statistics
Σt(n):=Lt(n1).*(((X.*M)./(Lt(n1)Lv(n1)))Lv(n1))
Σv(n):=Lv(n1).*(Lt(n1)((X.*M)./(Lt(n1)Lv(n1))))
(4) Means
Et(n):=αt(n).*βt(n)αt(n)=At+Σt(n)βt(n)=1./(At./Bt+MEv(n1))
Ev(n):=αv(n).*βv(n)αv(n)=Av+Σv(n)βv(n)=1./(Av./Bv+Et(n)M)
(5) Optional: Compute Bound (See Appendix, (A.13)
(6) Means of Logs
Lt(n)=exp(Ψ(αt(n))).*βt(n)Lv(n)=exp(Ψ(αv(n))).*βv(n)
(7) Optional: Update Hyperparameters (See Appendix, Section )
(8) end for