LinkRank | R Documentation |
Calculates the LinkRank Matrix, according to Kim et al. [1].
LinkRank(G, pr)
G |
Google Matrix. Output of |
pr |
PageRank vector. Output of |
"Similar to the definition of PageRank, LinkRank of a particular link should be equal to the probability that a random walker follows the link from node i to node j" [1]. LinkRank from node i to node j can be defined as L_{ij} = π_{i} * G_{ij}, where π_{i} is the ith element of the PageRank vector, and G_{ij} is the element of the Google Matrix.
LinkRank Matrix
[1] Kim Y, Son SW, Jeong H (2010). "Finding Communities in Directed Networks." Physical Review E 81, 016103. doi: 10.1103/PhysRevE.81.016103
# Generate an arbitrary 100 by 100 adjacency matrix with zeros and ones # Remove loops A <- matrix(rbinom(100 * 100, 1, 0.2), ncol = 100, nrow = 100) diag(A) <- 0 # Calculate Google Matrix G <- GoogleMatrix(A) # Calculate PageRank vector pr <- pageRank(A) # Calculate LinkRank Matrix LinkRank(G,pr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.