Learn R Programming

robin (version 1.0.0)

robinCompare: 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", "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
)

Arguments

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 methodCommunity.

FUN2

personal designed function when method2 is "others". see methodCommunity.

measure

The stability measure, one of "vi", "nmi", "split.join", "adjusted.rand".

type

The type of robin costruction, 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.

Value

A list object

Examples

Run this code
# NOT RUN {
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")
# }

Run the code above in your browser using DataLab