RWR

Description

This function runs a random walk with restart using two supported matrix representations.

Usage

1
RWR(boolSparceMat, transmat, restart, query, startvec, maxiters, thresh)

Arguments

boolSparceMat

(bool): Boolean to indicate sparce Matrix or list matrix.

transmat

(sparce Matrix / list matrix): transition probabilites.

restart

(float): probability of restart.

query

(vector): probability of restarting at all nodes.

startvec

(vector): initial probability of being at any node.

maxiters

(int): maximum number of allowable iterations.

thresh

(float): threshold for L1 norm convergence.

Value

list of 'iter':number of iterations, 'diff': L1 norm of difference, 'vec': converged probability distribution vector.

Examples

1
2
RWR(boolSparceMat=TRUE, transmat=transmat, restart=.3, query=c(rep(0.1,10),rep(0,5)),
	startvec=rep(1/15,15), maxiters=10, thresh=0.001)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.