Table 3. A diffusion-based node ranking algorithm.
A network walker uses a probability diffusion algorithm described in Table 2 to decide which nodes to visit in a network. Starting from a given node, snext, the network walker’s steps are recorded in vns (“visited nodes”). We record the network walker’s visited nodes, vns, for each starting node in S in a hash object, noderanks.
A Diffusion-Based Node Ranking Algorithm |
---|
input: G, S, num_misses, p1, thresholdDiff, adj_mat G [hash]–node names are KEYS, node probabilities are VALUES S [vector]–a subset of node names (KEYS) in G num_misses [int]–number of consecutive misses that terminates the walk p1 [float]–probability to be divided across network nodes thresholdDiff [float]–probability threshold at which diffusion truncates adj_mat [matrix]–the weighted adjacency matrix of the network |
output: noderanks noderanks [hash]–node names in S are KEYS, vectors of node names visited are VALUES SINGLE_NODE_DIFFUSION (G, S, num_misses, p1, thresholdDiff, adj_mat) 1 noderanks = Hash() 2 vns = [] 3 for each node in S do 4 vns.push (node) 5 n_miss = 0 6 snext = node 7 while (not all S in vns) & (n_miss < num_misses) do 8 G = DIFFUSE_PROB (p1, thresholdDiff, snext, G, vns, adj_mat) 9 snext = KEYS (which.max(G)) 10 if snext in S then 11 n_miss = 0 12 else 13 n_miss + = 1 14 end if 15 vns.push (snext) 16 end while 17 noderanks[node] = vns 18 end for 19 return noderanks |