cluster_concordance: Concordance Network Clustering

Description Usage Arguments Details Value Examples

View source: R/functions.R

Description

This function receives an MxN matrix with named columns (will be used to name vertices), and returns a list of igrpah graphs representing the resulting clusters (e.g. symptom clusters of "patient communities").

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
cluster_concordance(
  mat,
  nrows = nrow(mat),
  ncols = ncol(mat),
  thresh = 1,
  detectAlgo = "WT",
  simil_measure = "ARI",
  centrality = "Betweenness",
  cluster_colors = NULL,
  sparsify = 0,
  simplify_graphs = TRUE,
  reactive_dom = NULL,
  incProg_amount = 1
)

Arguments

mat

MxN matrix

nrows

number of rows to analyze (defaults to all rows)

ncols

number of columns to analyze (defaults to all columns)

thresh

integer threshld below which entries (e.g. symptom scores) will be set to 0 (i.e. considered as non-present)

detectAlgo

string value, the type of network community detection algorithm to use (defaults to 'WT')

simil_measure

string value, similarity function used (string value), can be either 'ARI' (default) or 'Euclidean'.

centrality

string value, centrality measure to use for indicating central nodes (via node size in the igraph networks)

cluster_colors

string value,

sparsify

number in [0,100] percentage of the weakest network edges to remove from the centrality computation, to allow central nodes to be detected more easily.

reactive_dom

reactive domain in case used in a shiny app (will be used by incProgress()).

inProg_amount

real number in [0,1], the amount of status bar to fill up (default is 1), in case used in a shiny app (will be used by incProgress()).

Details

It does so using the method of concordance networks clustering as described in Henry et al. "Concordance networks and application to clustering cancer symptomology - PLOS." 14 Mar. 2018.

The detection algorithm (from the igraph library) can be chosen out of the following list:

'WT' (default) for cluster_walktrap. Community strucure via short random walks. 'FG' for cluster_fast_greedy(), Community structure via greedy optimization of modularity. 'IM' for cluster_infomap(), Infomap community finding. 'LP' for cluster_label_prop(), Finding communities based on propagating labels. 'LE' for cluster_leading_eigen(), Community structure detecting based on the leading eigenvector of the community matrix. 'LV' for cluster_louvain(), Finding community structure by multi-level optimization of modularity.

Value

list consisting of (1) a list of the normalized community networks, and (2) the associated communities (e.g. as generated by igraph::groups(cluster_walktrap(g)))

Examples

1
2
3
data = rbinom(300*20, 1, .2)
data = matrix(data,300,20)
results = concord_cluster(data)

oricel/concordNets documentation built on April 9, 2020, 3:45 a.m.