View source: R/ROBIN_external_function.R
| robinRobust | R Documentation |
This functions implements a procedure to examine the stability of the partition recovered by some algorithm against random perturbations of the original graph structure.
robinRobust(
graph,
graphRandom,
method = c("walktrap", "edgeBetweenness", "fastGreedy", "louvain", "spinglass",
"leadingEigen", "labelProp", "infomap", "optimal", "leiden", "other"),
...,
FUN = NULL,
measure = c("vi", "nmi", "split.join", "adjusted.rand"),
type = "independent",
verbose = TRUE,
rewire.w.type = "Rewire",
seed = NULL,
BPPARAM = NULL
)
graph |
The output of prepGraph. |
graphRandom |
The output of random function. |
method |
The clustering method, one of "walktrap", "edgeBetweenness", "fastGreedy", "louvain", "spinglass", "leadingEigen", "labelProp", "infomap", "leiden","optimal". |
... |
other parameters for the community detection methods. |
FUN |
in case the @method parameter is "other" there is the possibility to use a personal function passing its name through this parameter. The personal parameter has to take as input the @graph and the @weights (that can be NULL), and has to return a community object. |
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. |
verbose |
flag for verbose output (default as TRUE). |
rewire.w.type |
for weighted graph. Option to rewire one of "Rewire", "Shuffle","Garlaschelli","Sum". "Garlaschelli" method only for count weights, "Sum" method only for continuous weights. |
seed |
set seed (default seed=NULL) |
BPPARAM |
optional BiocParallel parameter object. If |
A robin object a list with: - "Mean" and "MeanRandom" matrices with the means of the procedure for the graph and the random graph respectively. - "Communities" the output communities with the method used. - "graph" the real data graph.
my_file <- system.file("example/football.gml", package="robin")
graph <- prepGraph(file=my_file, file.format="gml")
graphRandom <- random(graph=graph)
robinRobust(graph=graph, graphRandom=graphRandom, method="leiden")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.