Computes community scoring functions to the communities obtained by applying the given clustering algorithms to a graph. These are compared to the same scores for randomized versions of the graph obtained by a switching algorithm that rewires edges.
evaluate_significance_r(
g,
alg_list = list(Louvain = cluster_louvain, `label prop` = cluster_label_prop, walktrap
= cluster_walktrap),
no_clustering_coef = FALSE,
gt_clustering = NULL,
table_style = "default",
ignore_degenerate_cl = TRUE,
Q = 100,
lower_bound = 0,
weight_sel = "const_var",
n_reps = 5,
w_max = NULL
)
A matrix with the results of each scoring function and algorithm. See table_style
for details.
Graph to be analyzed (as an igraph
object)
List of clustering algorithms, which take an igraph
graph as
input and return an object of the communities
class.
Logical. If TRUE
, skips the computation of the clustering
coefficient, which is the most computationally costly of the scoring functions.
Vector of integers that correspond to labels of the ground truth clustering. The scoring functions will be evaluated on it.
By default returns a table with three columns per algorithm: the original one, the mean of the corresponding rewired scores (suffix "_r") and it's percentile rank within the distribution of rewired scores (suffix "_percentile"). If table_style == "string", instead returns a table with a column per algorithm where each element is of the form "original|rewired(percentile)"
Logical. If TRUE, when computing the means of the scoring functions, samples with only one cluster will be ignored. See rewireCpp.
Numeric. Parameter that controls the number of iterations of the switching algorithm, which will be Q times the order of the graph.
Numeric. Lower bound to the edge weights. The randomization process will avoid steps that would make edge weights fall outside this bound. It should generally be left as 0 to avoid negative weights.
Can be either const_var
or max_weight
.
Number of samples of the rewired graph.
Numeric. Upper bound for edge weights. The randomization algorithm will avoid steps that would make
edge weights fall outside this bound. Should be generally left as default (NULL
), unless the network has
by nature or by construction a known upper bound.