Description Usage Arguments Value Author(s) See Also Examples
View source: R/FindStructure.R
This internal function of the spectral clustering algorithm finds the structure of the graph to cluster (number of nodes and connected components).
1 |
A |
The adjacency matrix |
A list with the following elements:
graph
igraph object derived from A,
groups
List of connected components and corresponding nodes.
Camille Champion, Magali Champion
l1_spectralclustering
, l1spectral
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ###############################################################
# Finding the structure of the graph from the adjacency matrix
###############################################################
# 1st example: non-perturbed graph
Data <- CreateDataSet(k=3, n=20, p=list(p_inside=0,p_outside=0))
Structure <- FindStructure(Data$A_hat)
Structure$groups # the graph is not perturbed, there are 3 connected components
# 2nd example: highly-perturbed graph
Data <- CreateDataSet(k=3, n=20, p=list(p_inside=0.5,p_outside=0.5))
Structure <- FindStructure(Data$A_hat)
Structure$groups # the graph is higlhy perturbed, there are less than 3 connected components
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.