View source: R/analyze_pagerank_grid.R
| analyze_pagerank_grid | R Documentation |
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.
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"
)
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"'. |
A data frame with one row per model and the following columns:
Model identifier
Number of nodes in the model
Sum of PageRank scores (1 for standard graphs, less when evaporation or vanish is active)
Maximum PageRank score
Gini coefficient (see [pr_gini()])
Shannon entropy (see [pr_entropy()])
Share of total PR held by the top 10 percent of nodes (see [pr_top_k_share()])
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.