Skip to main content
. 2021 Jun 26;23(7):815. doi: 10.3390/e23070815
Algorithm 1 Extended VMP (Mean-field assumption)
  • Require:  G=(V,E), h1:M+L, Niterations, qinitial

  • for  j=1M+L  do

  •   initialize posteriors q(hj) using qinitial

  • end for

  • for i = 1...Niterations do

  •   Set Free Energy F=0

  •   for  j=1M+L  do

  •    Calculate messages mhj(hj) and mhj(hj) using Section 3.6

  •    Calculate posterior q(hj) using Section 3.5

  •    if  hjz1:M  then

  •     Calculate entropy Hhj using Section 3.7

  •     Update Free Energy F=FHhj

  •    end if

  •   end for

  •   for all  vVf  do

  •    Calculate energy Uv using Section 3.7

  •    Update Free Energy F=F+Uv

  •   end for

  •   return q(h) for all hh1:M+L and F

  • end for