This function compares the robustness of two community detection algorithms.
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 = "independent",
verbose = TRUE,
dist = "Other",
BPPARAM = BiocParallel::bpparam()
)
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
The output of prepGraph.
The first clustering method, one of "walktrap", "edgeBetweenness", "fastGreedy", "louvain", "spinglass", "leadingEigen", "labelProp", "infomap","leiden","optimal","other".
A list
of arguments to be passed to the method1
(see i.e. cluster_leiden for a list of possible method parameters).
The second custering method one of "walktrap", "edgeBetweenness","fastGreedy", "louvain", "spinglass", "leadingEigen", "labelProp", "infomap","leiden","optimal","other".
A list
of arguments to be passed to the method2
(see i.e. cluster_leiden for a list of possible method parameters).
personal designed function when method1
is "other".
see methodCommunity
.
personal designed function when method2
is "other".
see methodCommunity
.
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.
The type of robin construction, dependent or independent.
flag for verbose output (default as TRUE).
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
rewireR
for details.
the BiocParallel object of class bpparamClass
that
specifies the back-end to be used for computations. See
bpparam
for details.
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")
Run the code above in your browser using DataLab