This function compares two community detection algorithms.
Is the parallelized and faster version of robinCompare
robinCompareFast(
graph,
method1 = c("walktrap", "edgeBetweenness", "fastGreedy", "leadingEigen", "louvain",
"spinglass", "labelProp", "infomap", "optimal", "other"),
method2 = c("walktrap", "edgeBetweenness", "fastGreedy", "leadingEigen", "louvain",
"spinglass", "labelProp", "infomap", "optimal", "other"),
measure = c("vi", "nmi", "split.join", "adjusted.rand"),
ncores = 2,
FUN1 = NULL,
FUN2 = NULL,
directed = FALSE,
weights = NULL,
steps = 4,
spins = 25,
e.weights = NULL,
v.weights = NULL,
nb.trials = 10,
verbose = TRUE
)
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","optimal".
The second custering method one of "walktrap", "edgeBetweenness","fastGreedy", "louvain", "spinglass", "leadingEigen", "labelProp", "infomap","optimal".
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.
number of CPU cores to use.(default is 2) For a faster execution we suggest to use ncores=(detectCores(logical = FALSE)-1)
personal designed function when method1 is "others".
see methodCommunity
.
personal designed function when method2 is "others".
see methodCommunity
.
This argument is settable only for "edgeBetweenness" method.
This argument is not settable for "infomap" method.
This argument is settable only for "leadingEigen"and"walktrap" method.
This argument is settable only for "infomap" method.
This argument is settable only for "infomap" method.
This argument is settable only for "infomap" method.
This argument is settable only for "infomap" method.
flag for verbose output (default as TRUE).
my_file <- system.file("example/football.gml", package="robin")
graph <- prepGraph(file=my_file, file.format="gml")
robinCompareFast(graph=graph, method1="louvain",
method2="fastGreedy", measure="vi")
Run the code above in your browser using DataLab