Skip to main content
. 2019 Jul 19;21(7):708. doi: 10.3390/e21070708
Algorithm 1: GaBP Algorithm
  • Step 0 Initialization:

    Set a convergence threshold ϵ, Pki=0 and θki=0,kN(i). Compute Pii=Aii and θii=bi/Aii.

  • Step 1 Iteration:

    Propagate the messages Pki and θki,kN(i). Compute Pij=Aij2/(Pii+kN(i)\jPki),θij=(Piiθii+kN(i)\jPkiθki)/Aij.

  • Step 2 Convergence check:

    If the message Pij and θij do not converge, return to Step 1, else, go to Step 3.

  • Step 3 Inference:

    Compute the marginal means θi=(Piiθii+kN(i)Pkiθki)/((Pii+kN(i)Pki)).

  • Step 4 Output:

    Output the solution wi=θi.