cluster_spectral {HyperG} | R Documentation |
Spectral Graph Clustering
Description
Use spectral embedding to embed a graph into a lower dimension, then cluster the points using model based clustering. This results in a clustering of the vertices.
Usage
cluster_spectral(g, verbose = FALSE, adjust.diag = FALSE, laplacian = FALSE,
normalize = FALSE, scale.by.values = FALSE, vectors = "u", d = 12, ...)
Arguments
g |
a graph. |
verbose |
logical. Whether to print to the screen as it goes. |
adjust.diag |
logical. Whether to set the diagonal of the adjacency matrix to
|
laplacian |
logical. Whether to use the Laplacian rather than the adjacency matrix. |
normalize |
logical. Whether to normalize the matrix by |
scale.by.values |
Whether to scale the embedding vectors by the eigen vectors. |
vectors |
character. "u" or "v" or "uv". The latter is only appropriate for directed graphs. |
d |
embedding dimension. |
... |
arguments passed to |
Details
This first embeds the vertices into a d-dimensional space, using the adjacency
matrix or the Laplacian. See ase
for more information. It then
applies Mclust
to the resultant points to cluster.
Value
An object of class "Mclust".
Author(s)
David J. Marchette dmarchette@gmail.com
References
Fraley C. and Raftery A. E. (2002) Model-based clustering, discriminant analysis and density estimation, _Journal of the American Statistical Association_, 97/458, pp. 611-631.
See Also
ase
.
Examples
P <- rbind(c(.2,.05),c(.05,.1))
ns <- rep(50,2)
set.seed(451)
g <- sample_sbm(sum(ns),P,ns)
cluster_spectral(g)