| auto_grid | R Documentation |
Creates a named list of parameter lists suitable for passing to [pagerank_grid()]. Each combination of the supplied parameter values becomes one entry, with an auto-generated model ID describing the configuration.
This is the "exhaustive search" complement to manually specifying a 'params_grid' – it generates all combinations of the parameter values you provide.
auto_grid(...)
... |
Named arguments where each value is a vector of options to sweep. Parameter names must match [pagerank()] arguments. |
A named list of named lists, ready to pass as 'params_grid' to [pagerank_grid()]. Names are auto-generated from the parameter values (e.g., '"damping=0.85_self_loops=drop"').
# Generate all combinations of damping and self-loop handling
grid <- auto_grid(damping = c(0.85, 0.95), self_loops = c("drop", "keep"))
str(grid)
# $`damping=0.85_self_loops=drop`
# $`damping=0.85_self_loops=keep`
# $`damping=0.95_self_loops=drop`
# $`damping=0.95_self_loops=keep`
# Use with pagerank_grid()
edges <- data.frame(
from = c("A", "B"), to = c("B", "A")
)
results <- pagerank_grid(edges, auto_grid(damping = c(0.5, 0.85, 0.95)),
clean_edge_urls = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.