Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/RWRandMatrices.R
Random.Walk.Restart.MultiplexHet
is a function to perform a Random
Walk with Restart on a Multiplex and Heterogeneous network (on a
MultiplexHet
object). See more details about the algorithm below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Random.Walk.Restart.MultiplexHet(...)
## Default S3 method:
Random.Walk.Restart.MultiplexHet(
x,
MultiplexHet_Object,
Multiplex1_Seeds,
Multiplex2_Seeds,
r = 0.7,
tau1,
tau2,
eta = 0.5,
MeanType = "Geometric",
DispResults = "TopScores",
...
)
|
... |
Further arguments passed to
|
x |
An object of the |
MultiplexHet_Object |
A |
Multiplex1_Seeds |
A vector containing the names of the seeds of the first multiplex network for the Random Walk algorithm. See more details below. |
Multiplex2_Seeds |
A vector containing the names of the seeds of the second multiplex network for the Random Walk algorithm. See more details below.' |
r |
A numeric value between 0 and 1. It sets the probability of restarting to a seed node after each step. See more details below. |
tau1 |
A vector containing the probability of restart on the seeds of the different multiplex layers (layers weights) for the first multiplex. It must have the same length than the number of layers of the multiplex. network. The sum of its components divided by the number of layers must be 1. See more details below. |
tau2 |
A vector containing the probability of restart on the seeds of the different multiplex layers (layers weights) for the second multiplex. It must have the same length than the number of layers of the multiplex. network. The sum of its components divided by the number of layers must be 1. See more details below. |
eta |
A numeric value between 0 and 1. It controls the probability of restarting in each network of the heterogeneous system (Multiplex or second network). See more details below. |
MeanType |
The user can choose one of the following options: c("Geometric","Arithmetic","Sum"). These options represent the different way to combine the RWR score for the same node in different layers. By default and recommended Geometric (Geometric Mean.). Arithmetic is the arithmetic mean and sum just sum all the scores for the same node across the different layers. |
DispResults |
The user can choose one of the following options: c("TopScores","Alphabetic"). These options represent the way the RWR results would be presented. By default, and recommended, the nodes would be ordered by score. This option is also required to properly run the |
Random Walk with Restart simulates an imaginary particle which starts on a seed(s) node(s) and follows randomly the edges of a network. At each step, there is a restart probability, r, meaning that the particle comes back to the seed(s). The extension to multiplex networks allows the particle to explore different monoplex networks (layers). At each step, the particle can also jump to the same node in a different layer. The extension to heterogeneous networks allows the particle to jump between nodes of different nature thanks to bipartite relationships between them. We can combine both, the multiplex and heterogeneous extension, by allowing the particle to jump from a node in every layer of the multiplex network to the other network, and the other way around.
Multiplex_Seed_Nodes
: A vector containing the name of the
different seed node(s) of the multiplex network. It's mandatory to provide at
least one seed (taking in account both types of seeds) The seed(s) node(s)
should belong to any of the layers of the multiplex network. The length of
this vector should be smaller than the total number of nodes in the multiplex
network.
SecondNet_Seed_Nodes
: A vector containing the name of the
different seed node(s) of the second network. It's mandatory to provide at
least one seed (taking in account both types of seeds) The seed(s) node(s)
should belong to the second network. The length of this vector should be
smaller than the total number of nodes in the second network.
r
: A numeric value representing the restart probability on the
seeds for the random walker. It must be between 0 and 1. It is set by default
to 0.7, which is the most common value in this kind of approaches. It means
that, at each step, the walker has a 70% of probability of coming back to
one of the seeds.
tau
: A numeric vector containing the probability of restarting
in the nodes of the different layers of the multiplex. In the example below,
we define the node 1 as the seed node. However, we can find this node in both
layers. Therefore, the walker can restart in any of these seed nodes. It is
a way to give different relevance (weight) to the different layers.
eta
: A numeric value between 0 and 1 controlling the
probability of restarting in the nodes of each network. In the example below,
we define the node 1 as a multiplex seed node and "E" as a second network
seed node. Therefore, the walker can restart either in the seed 1 or in the
seed "E" with different probabilities (it is a way to give more relevance
to the different components of the heterogeneous system). If eta < 0.5
the particle will be more likely to restart in one of the multiplex seeds.
A RWRMH_Results
object. It contains three sorted rankings:
i) The first one contains the global results, i.e. the nodes of both
multiplex networks along with their score;
ii) The second one contains the nodes of the first multiplex network,
except the seeds, along with their score.
iii) The last one contains the nodes of the second multiplex network,
excepting the seeds, along with their score
In addition, it contains one more field describing the nodes used as seeds.
Alberto Valdeolivas Urbelz alvaldeolivas@gmail.com
create.multiplexHet,
compute.transition.matrix, Random.Walk.Restart.Multiplex
isRWRMH_Results
1 2 3 4 5 6 7 8 9 10 11 12 13 | m1 <- igraph::graph(c(1,2,1,3,2,3), directed = FALSE)
m2 <- igraph::graph(c(1,3,2,3,3,4,1,4), directed = FALSE)
multiObject_1 <- create.multiplex(list(m1=m1,m2=m2))
h1 <- igraph::graph(c("A","C","B","E","E","D","E","C"), directed = FALSE)
bipartite_relations <- data.frame(m=c(1,3),h=c("A","E"))
multiObject_2 <- create.multiplex(list(h1=h1))
multiHetObject <- create.multiplexHet(multiObject_1, multiObject_2,
bipartite_relations)
MultiHetTranMatrix <- compute.transition.matrix(multiHetObject)
Multiplex1_Seeds <- c(1)
Multiplex2_Seeds <- c("E")
Random.Walk.Restart.MultiplexHet(MultiHetTranMatrix,
multiHetObject,Multiplex1_Seeds,Multiplex2_Seeds)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.