analyze_pagerank_grid: Analyze PageRank Grid Results

View source: R/analyze_pagerank_grid.R

analyze_pagerank_gridR Documentation

Analyze PageRank Grid Results

Description

Computes distribution metrics for each model in a [pagerank_grid()] result, producing a one-row-per-model summary. Useful for quickly comparing how different parameter configurations affect the shape of the PageRank distribution.

Usage

analyze_pagerank_grid(
  grid_result,
  model_id_col = "model_id",
  pr_col = "pagerank"
)

analyse_pagerank_grid(
  grid_result,
  model_id_col = "model_id",
  pr_col = "pagerank"
)

Arguments

grid_result

A data frame returned by [pagerank_grid()], with columns 'model_id', a node column, and a PageRank value column.

model_id_col

Name of the model identifier column. Default '"model_id"'.

pr_col

Name of the PageRank value column. Default '"pagerank"'.

Value

A data frame with one row per model and the following columns:

model_id

Model identifier

num_nodes

Number of nodes in the model

pr_sum

Sum of PageRank scores (1 for standard graphs, less when evaporation or vanish is active)

pr_max

Maximum PageRank score

pr_gini

Gini coefficient (see [pr_gini()])

pr_entropy

Shannon entropy (see [pr_entropy()])

pr_top10_share

Share of total PR held by the top 10 percent of nodes (see [pr_top_k_share()])

Examples

edges <- data.frame(
  from = c("A", "B", "C", "A"),
  to = c("B", "C", "A", "C")
)
params <- list(
  low = list(damping = 0.5),
  high = list(damping = 0.95)
)
grid <- pagerank_grid(edges, params, clean_edge_urls = FALSE)
analyze_pagerank_grid(grid)

pagerankr documentation built on Oct. 1, 2026, 5:09 p.m.