RWR {DRaWR} | R Documentation |
RWR
Description
This function runs a random walk with restart using two supported matrix representations.
Usage
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 probabilities. |
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
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)
[Package DRaWR version 1.0.3 Index]