Skip to main content
. 2020 Feb 7;22(2):197. doi: 10.3390/e22020197
Algorithm 1 VGAECD-OPT

     Input: Features X, Adjacency Matrix A, no. of comm. K, filter size D, number of epochs L,

             NEM steps R.

     Output: Community Assignment Probability γ and Reconstructed Adjacency matrix A˜

  • 1:

    πU(0,1)

  • 2:

    for l=1,,Ldo

  • 3:

        for i=1,,N do

  • 4:

            μi=SGCμ(xi,ai)

  • 5:

            σi=SGCσ(xi,ai)

  • 6:

            Sample ziN(μx|i,diag(σx2|i))

  • 7:

            Obtain a˜i=σ(zizj)

  • 8:

            Compute loss, LELBO            ▹ From Equation (12)

  • 9:

               and backpropagate gradients.

  • 10:

        end for

  • 11:

        for r=1,,R do

  • 12:

            Compute E-Step: γ, {μc, σc}        ▹ From Equation (14)

  • 13:

            Compute M-Step: μc, σc, {γ}        ▹ From Equation (16)

  • 14:

            Compute loss, Lcomm

  • 15:

               and backpropagate gradients.

  • 16:

        end for

  • 17:

    end for

  • 18:

    Extract community assignment arg maxkγ

  • 19:

    Return A˜={a˜1,,a˜N}