graph.hclust {statGraph}R Documentation

Hierarchical Cluster Analysis on a List of Graphs

Description

Given a list of graphs, graph.hclust builds a hierarchy of clusters according to the Jensen-Shannon divergence between graphs.

Usage

graph.hclust(Graphs, k = NULL, clus_method = "complete", dist = "JS", ...)

Arguments

Graphs

a list of undirected graphs. If each graph has the attribute eigenvalues containing its eigenvalues , such values will be used to compute their spectral density.

k

the number of clusters. If NULL, it won't return the computed clustering.

clus_method

the agglomeration method to be used. This should be (an unambiguous abbreviation of) one of ”ward.D”, ”ward.D2”, ”single”, ”complete”, ”average” (= UPGMA), ”mcquitty” (= WPGMA), ”median” (= WPGMC) or ”centroid” (= UPGMC).

dist

string indicating if you want to use the 'JS' (default), 'L1' or 'L2' distances. 'JS' means Jensen-Shannon divergence.

...

Other relevant parameters for graph.spectral.density.

Value

A list containing the following elements:

hclust:

A class of type 'hclust'.

cluster:

A vector of the same length of Graphs containing the clusterization labels.

References

Takahashi, D. Y., Sato, J. R., Ferreira, C. E. and Fujita A. (2012) Discriminating Different Classes of Biological Networks by Analyzing the Graph Spectra Distribution. _PLoS ONE_, *7*, e49949. doi:10.1371/journal.pone.0049949.

Silverman, B. W. (1986) _Density Estimation_. London: Chapman and Hall.

Sturges, H. A. The Choice of a Class Interval. _J. Am. Statist. Assoc._, *21*, 65-66.

Sheather, S. J. and Jones, M. C. (1991). A reliable data-based bandwidth selection method for kernel density estimation. _Journal of the Royal Statistical Society series B_, 53, 683-690. http://www.jstor.org/stable/2345597.

Examples

set.seed(1)
G <- list()
for (i in 1:5) {
  G[[i]] <- igraph::sample_gnp(50, 0.5)
}
for (i in 6:10) {
  G[[i]] <- igraph::sample_smallworld(1, 50, 8, 0.2)
}
for (i in 11:15) {
  G[[i]] <- igraph::sample_pa(50, power = 1, directed = FALSE)
}
graph.hclust(G, 3)


[Package statGraph version 1.0.3 Index]