Learn R Programming

cograph (version 2.0.0)

centrality_pagerank: PageRank Centrality

Description

Random walk centrality measuring node importance. Simulates a random walker that follows edges with probability damping and jumps to a random node with probability 1 - damping.

Usage

centrality_pagerank(x, damping = 0.85, personalized = NULL, ...)

Value

Named numeric vector of PageRank values.

Arguments

x

Network input (matrix, igraph, network, cograph_network, tna object).

damping

Damping factor (probability of following an edge). Default 0.85.

personalized

Named numeric vector for personalized PageRank. Values should sum to 1. Default NULL (uniform).

...

Additional arguments passed to centrality (e.g., weighted, directed).

See Also

centrality for computing multiple measures at once, centrality_eigenvector for a related measure.

Examples

Run this code
adj <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), 3, 3)
rownames(adj) <- colnames(adj) <- c("A", "B", "C")
centrality_pagerank(adj)
centrality_pagerank(adj, damping = 0.9)

Run the code above in your browser using DataLab