Skip to main content
. 2019 Mar 6;21(3):254. doi: 10.3390/e21030254
Algorithm 2 Model training
Require: Attributed networks Gs and Gt, parameters λ1 and λ2, batch sizes K1, K2 and K3;
  • 1:

    for it=1Max_It do

  • 2:

     Sample a group of node pairs of size K1 in the anchor links set T;

  • 3:

     Let R1=1K1(xls,xnt)logP(xls,xnt), perform a gradient calculation on R1;

  • 4:

     Sample a group of contexts (xis,xcs,γ) of size K2 in the source network Gs;

  • 5:

     Let R2=λ1K2(xis,xcs,γ)logσ(γwcsTeis), perform a gradient calculation on R2;

  • 6:

     Sample a group of contexts (xit,xct,γ) of size K3 in the target network Gt;

  • 7:

     Let R3=λ2K3(xit,xct,γ)logσ(γwctTeit), perform a gradient calculation on R3.

  • 8:

    end for