robinCompare | R Documentation |
This function compares the robustness of two community detection algorithms.
robinCompare( 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"), FUN1 = NULL, FUN2 = NULL, measure = c("vi", "nmi", "split.join", "adjusted.rand"), type = c("independent", "dependent"), directed = FALSE, weights = NULL, steps = 4, spins = 25, e.weights = NULL, v.weights = NULL, nb.trials = 10, verbose = TRUE )
graph |
The output of prepGraph. |
method1 |
The first clustering method, one of "walktrap", "edgeBetweenness", "fastGreedy", "louvain", "spinglass", "leadingEigen", "labelProp", "infomap","optimal". |
method2 |
The second custering method one of "walktrap", "edgeBetweenness","fastGreedy", "louvain", "spinglass", "leadingEigen", "labelProp", "infomap","optimal". |
FUN1 |
personal designed function when method1 is "others".
see |
FUN2 |
personal designed function when method2 is "others".
see |
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 |
The type of robin construction, dependent or independent. |
directed |
This argument is settable only for "edgeBetweenness" method. |
weights |
This argument is not settable for "infomap" method. |
steps |
This argument is settable only for "leadingEigen"and"walktrap" method. |
spins |
This argument is settable only for "infomap" method. |
e.weights |
This argument is settable only for "infomap" method. |
v.weights |
This argument is settable only for "infomap" method. |
nb.trials |
This argument is settable only for "infomap" method. |
verbose |
flag for verbose output (default as 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
my_file <- system.file("example/football.gml", package="robin") graph <- prepGraph(file=my_file, file.format="gml") robinCompare(graph=graph, method1="louvain", method2="fastGreedy", measure="vi", type="independent")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.