Skip to main content
. 2017 Aug 3;17(8):1786. doi: 10.3390/s17081786
Algorithm 2 The framework of Biased Constrained Active Learning
Input: Two heterogeneous social networks: Gs and Gt. Two sets of labeled anchor link: The training set At and the validation set Av. The query pool P. The max number of queries nq. The potential entropy computation method Hp. The threshold adjusting pace Δδ
Output: The new training set At and the new query pool P
  • 1:

    Initialize n0, δ0.5, HoldP+, Pold+0.5, d0.1

  • 2:

    For each a in At and P, extract four types of features.

  • 3:

    while n<nq do

  • 4:

        Train a SVM model θ on At according to the training part in MNA.

  • 5:

        For each a in P, use θ to predict Pθ(0|a) and Pθ(1|a).

  • 6:

        HnewPaPHB(a)

  • 7:

        if HnewP<HoldP and δ>0 then δδΔδ

  • 8:

        else if HnewPHoldP then δMax{Pold+,δ+Δδ}

  • 9:

        end if

  • 10:

        Use θ as the trained classifier in MNA, and use MNA to predict the labels of all links in P, and collect all of the predicted positive links into the set Ap+. Then set A^p+{a|aAp+,Pθ(1|a)δ}.

  • 11:

        while A^p+ is ∅ do

  • 12:

            δδd, A^p+{a|aAp+,Pθ(1|a)δ}

  • 13:

            if δ<0 then A^p+P

  • 14:

            end if

  • 15:

        end while

  • 16:

        Ap+A^p+

  • 17:

        if Hp is HB then

  • 18:

            For each a in Ap+, compute Hp(a) by Equation (2)

  • 19:

        else

  • 20:

            Use MNA to predict the labels of all links in Av, and compute PYY and PNY by Equation (4)

  • 21:

            For each a in Ap+, find R(a) and compute Hp(a) by Equation (5)

  • 22:

        end if

  • 23:

        Select the link ah which has the highest Hp(a) in Ap+, and identify its real label, and set Pold+Pθ(1|ah)

  • 24:

        if the real label of ah is “negative” then

  • 25:

            ah0, AtAt{ah}, PP{ah}

  • 26:

            HoldPHnewPHB(ah)

  • 27:

        else

  • 28:

            ah1

  • 29:

            Find R(ah) from P. For each ar in R(ah), set ar0

  • 30:

            AtAt{ah}R(ah) ,PP{ah}R(ah)

  • 31:

            HoldPHnewPHB(ah)aR(ah)HB(a)

  • 32:

        end if

  • 33:

        nn+1

  • 34:

    end while