randomWalk: Random walk with restarts

View source: R/CellWalkerFunctions.R

randomWalkR Documentation

Random walk with restarts

Description

randomWalk() solves a random walk with restarts on an adjacency matrix A using the closed form solution for the influence matrix F = r(I - (1 - r)W)-1 where W = D-1A and D is a diagonal matrix of the sums of edge weights for each node and r is the restart probability

Usage

randomWalk(adj, r = 0.5, tensorflow = FALSE, steps)

Arguments

adj

adjacency matrix

r

restart probability

tensorflow

boolean to indicate whether to compute on GPU

steps

integer indicating number of steps to take if walk should not be run to convergence

Value

influence matrix, each column is the vector of influences on each row

Examples

data("SampleCellWalkRData")
adj <- combineGraph(SampleCellWalkRData$labelEdges, SampleCellWalkRData$cellEdges)
randomWalk(adj)


PFPrzytycki/CellWalkR documentation built on Oct. 26, 2023, 1:50 p.m.