Skip to contents

PageRank is already implemented three-way in Pgrank, so this is a name, not a second implementation: a duplicate would be one more place for the dangling-node mass to be handled differently.

Usage

Prnkpg(G, damping = 0.85, n_iter = 100)

Arguments

G

Adjacency matrix; G[i, j] non-zero is a link i to j.

damping

Damping factor.

n_iter

Power iterations.

Value

The value of Pgrank.

Details

Formula: x = (1 - d)/n + d A^T D^-1 x.

References

Page, L., Brin, S., Motwani, R. & Winograd, T. (1999). Stanford InfoLab technical report 1999-66.

Examples

M <- matrix(c(1, 2, 3, 4, 5, 6), nrow = 2)
Prnkpg(M)
#> $pr
#> [1] 0.1057334 0.1464527
#> 
#> $estimate
#> [1] 0.1464527
#> 
#> $top
#> [1] 1
#> 
#> $n
#> [1] 2
#> 
#> $method
#> [1] "PageRank by fixed power iteration"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"