robinCompare {robin} | R Documentation |
robinCompare
Description
This function compares the robustness of two community detection algorithms.
Usage
robinCompare(
graph,
method1 = c("walktrap", "edgeBetweenness", "fastGreedy", "leadingEigen", "louvain",
"spinglass", "labelProp", "infomap", "optimal", "leiden", "other"),
args1 = list(),
method2 = c("walktrap", "edgeBetweenness", "fastGreedy", "leadingEigen", "louvain",
"spinglass", "labelProp", "infomap", "optimal", "leiden", "other"),
args2 = list(),
FUN1 = NULL,
FUN2 = NULL,
measure = c("vi", "nmi", "split.join", "adjusted.rand"),
type = NULL,
verbose = TRUE,
dist = "Other",
BPPARAM = BiocParallel::bpparam()
)
Arguments
graph |
The output of prepGraph. |
method1 |
The first clustering method, one of "walktrap", "edgeBetweenness", "fastGreedy", "louvain", "spinglass", "leadingEigen", "labelProp", "infomap","leiden","optimal","other". |
args1 |
A |
method2 |
The second custering method one of "walktrap", "edgeBetweenness","fastGreedy", "louvain", "spinglass", "leadingEigen", "labelProp", "infomap","leiden","optimal","other". |
args2 |
A |
FUN1 |
personal designed function when |
FUN2 |
personal designed function when |
measure |
The stability measure, one of "vi", "nmi", "split.join", "adjusted.rand" all normalized and used as distances. "nmi" refers to 1- nmi and "adjusted.ran" refers to 1-adjusted.rand. |
type |
Character indicating "independent" or "dependent" for the old robin type contruction. If NULL the new faster version is computed (default NULL). |
verbose |
flag for verbose output (default as TRUE). |
dist |
Option to rewire in a manner that retains overall graph weight
regardless of distribution of edge weights. This option is invoked by putting
any text into this field. Defaults to "Other". See
|
BPPARAM |
the BiocParallel object of class |
Value
A list object with two matrices: - the matrix "Mean1" with the means of the procedure for the first method - the matrix "Mean2" with the means of the procedure for the second method
Examples
my_file <- system.file("example/football.gml", package="robin")
graph <- prepGraph(file=my_file, file.format="gml")
robinCompare(graph=graph, method1="louvain", args1 = list(resolution=0.8),
method2="leiden", args2=list(objective_function ="modularity"))