uNetwalk: Perform Random walk on a Unipartite Network

Description Usage Arguments References Examples

Description

Peforms random walk with restart with preferred seed sets. If seed sets are not given then the adjacencny matrix is taken as the input as the input seed sets. THe restart parameter controls the random walk probability . This can be changed default is set to 0.8. Normalization of the matrix can be done by row,column,laplacian. For faster computation Parallalization is implemented with multicores. Parallization is done using foreach package.

Usage

1
2
3
uNetwalk(ig, normalise = c("row", "column", "laplacian", "none"),
  dataSeed = NULL, restart = 0.8, parallel = TRUE, multicores = NULL,
  verbose = T)

Arguments

ig

igraph object

normalise

normalise method

dataSeed

vector or dataframe

restart

restart probability parameter

parallel

to execute in parallel either TRUE or FALSE

multicores

Number of cores to be used when running in parallel

verbose

Verbose output

References

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# generate a random graph according to the ER model
library(igraph)
library(netpredictor)
g1 <- upgrade_graph(erdos.renyi.game(100, 1/100))
V(g1)$name <- seq(1,100,1)
## Computing RWR
pM <- uNetwalk(g1,normalise="laplacian", restart=0.75, parallel=FALSE)
## Settin the seed nodes.
d1 <- c(1,0,1,0,1)
d2 <- c(0,0,1,0,1)
dataSeed <- data.frame(d1,d2)
rownames(dataSeed) <- 1:5
pM <- uNetwalk(g1, normalise="laplacian", dataSeed=dataSeed, restart=0.8,
               parallel=FALSE,multicores=NULL, verbose=T)

abhik1368/netpredictor documentation built on May 10, 2019, 4:09 a.m.