Function that performs a random Walk with restart (RWR) on a given graph
Function that performs a random Walk with restart (RWR) on a given graph
RWR(W, ind.positives, gamma =0.6)
Arguments
W: : adjacency matrix of the graph
ind.positives: : indices of the "core" positive examples of the graph. They represent to the indices of W corresponding to the positive examples
gamma: : restart parameter (def: 0.6)
Returns
a list with three elements: - p : the probability at the steady state - ind.positives : indices of the "core" positive examples of the graph (it is equal to the same input parameter - n.iter : number of performed iterations