condorCluster: Main clustering function for condor.

View source: R/CONDOR.R

condorClusterR Documentation

Main clustering function for condor.

Description

This function performs community structure clustering using the bipartite modularity described in condorModularityMax. This function uses a standard (non-bipartite) community structure clustering of the uni-partite, weighted projection of the original bipartite graph as an initial guess for the bipartite modularity.

Usage

condorCluster(
  condor.object,
  cs.method = "LCS",
  project = TRUE,
  low.memory = FALSE,
  deltaQmin = "default"
)

Arguments

condor.object

Output of make.condor.object. This function uses condor.object$edges

cs.method

is a string to specify which unipartite community structure algorithm should be used for the seed clustering. Options are LCS (cluster_louvain), LEC (leading.eigenvector.community), FG (fastgreedy.community).

project

Provides options for initial seeding of the bipartite modularity maximization. If TRUE, the nodes in the first column of condor.object$edges are projected and clustered using cs.method. If FALSE, the complete bipartite network is clustered using the unipartite clustering methods listed in cs.method.

low.memory

If TRUE, uses condorModularityMax instead of condorMatrixModularity. This is a slower implementation of the modularity maximization, which does not store any matrices in memory. Useful on a machine with low RAM. However, runtimes are (much) longer.

deltaQmin

convergence parameter determining the minimum required increase in the modularity for each iteration. Default is min(10^-4,1/(number of edges)), with number of edges determined by nrow(condor.object$edges). User can set this parameter by passing a numeric value to deltaQmin.

Value

condor.object with condorModularityMax output included.

Examples

r = c(1,1,1,2,2,2,3,3,3,4,4);
b = c(1,2,3,1,2,4,2,3,4,3,4);
reds <- c("Alice","Sue","Janine","Mary")
blues <- c("Bob","John","Ed","Hank")
elist <- data.frame(red=reds[r],blue=blues[b])
condor.object <- createCondorObject(elist)
condor.object <- condorCluster(condor.object)

netZoo/netZooR documentation built on Oct. 16, 2024, 10:23 p.m.