Prob.norm-methods {NetPreProc} | R Documentation |
Probabilistic normalization of a graph
Description
Method to compute the transition probability matrix of network.
A network matrix is normalized by dividing each entry W_{ij}
by the the sum of elements of row i
In other words if D
is a diagonal matrix such that D_{ii} = \sum_j W_{ij}
then the normalize matrix is:
W_{norm} = D^{-1} W
Usage
Prob.norm(W)
Arguments
W |
an object representing the graph to be normalized |
Value
The normalized transition probability matrix of network
Methods
signature(W = "graph")
-
an object of the virtual class graph (hence including objects of class
graphAM
andgraphNEL
from the package graph) signature(W = "matrix")
-
a matrix representing the adjacency matrix of the graph
Examples
library(bionetdata);
# making transition prob matrix for a drug-drug similarity network
data(DD.chem.data);
W <- Prob.norm(DD.chem.data);
# the same using an object of class graphAM and of class graphNEL
g <- new("graphAM", adjMat=DD.chem.data, values=list(weight=DD.chem.data));
Wg <- Prob.norm(g);
g2 <- as(g, "graphNEL");
Wg2 <- Prob.norm(g2);
[Package NetPreProc version 1.2 Index]