Skip to main content
. 2020 Jan 31;11(2):153. doi: 10.3390/genes11020153
Algorithm 1. Bias random walk algorithm.
Input G = (V, E, W), Len_walkLists, parameters w, p and q;
Output vertex sequence lists: walkLists
T = computing transition probabilities (G, p, q, w)//computing transition probabilities for every edge in the network
Tnorm = normalizing T by Equation (2) G’ = (V, E, Tnorm)
walkLists = {}
for iter = 1 to Len_walkLists do
    for every node u ∈ V do
      Append u to seq
      while len(seq) < w:
        t = seq [-1] // getting the last node of the set seq
        N(t) = sort (GetNeighbors(t, G’)) // sorting neighbor list of current vertex in alphabetic
                      order
        n = AliasSampling(N(t), Tnorm) //applying alias sampling with respect to the normalized
            transition probabilities to select a next visiting neighbor node
      Append n to seq
    Append seq to walkLists
return walkLists