LCDA-GRASP: fixed-parameter variant.
Usage
lcda_grasp(
g,
alpha_c = 0.1,
alpha_s = 0.3,
variant = 1,
B = 50,
centrality = "eigen",
similarity = "hpi",
verbose = FALSE,
seed = NA_integer_
)Value
an object of class `lcda_grasp_result`: best partition, Q/H traces, the parameters used, the wall-clock `elapsed` time in seconds, and the (simplified) input `graph`, so that [lcda_metrics()] and [plot()] can be called on the result alone.
Details
Weighted graphs: a numeric `weight` edge attribute is honoured by the modularity objective and the local search, but the construction (similarity and centrality) and the NCE leader score remain *structural* (unweighted).
See also
[lcda_metrics()] for the paper's metric surface computed from a result, and [plot.lcda_grasp_result()] for the community-and-leader map.
Examples
g <- igraph::make_graph("Zachary")
res <- lcda_grasp(g, B = 20, seed = 1)
res$best$Q
#> [1] 0.4020381
res$best$leaders
#> [1] 34 1 6
res$elapsed # wall-clock seconds
#> [1] 0.082