Description Usage Arguments Author(s) References Examples
The community detection-based graph clustering algorithm (codeGCluster) is baed on community detection methods, such as Louvain algorithm, fast-greedy modularity optimization algorithm, and near linear time algorithm. codeGCluster
retruns community information.
1 | codeGCluster(dat=dat, wt=4, k=NULL, diff_distance=0.1, method="louvain");
|
dat |
data.frame or matrix of x-coordinate and y-coordinate. |
wt |
weight: the initial distance cut-off value. The weight of edge larger than |
k |
integer: number of clusters. If |
diff_distance |
numeric value: distance change for each iteration. |
method |
character: method for community detection. The method should be one of |
Ying Hu yhu@mail.nih.gov
Chunhua Yan yanch@mail.nih.gov
Xiaoyu Liang xiaoyu.liang@yale.edu
Csardi, G., & Nepusz, T. (2006). The igraph software package for complex network research. InterJournal, complex systems, 1695(5), 1-9.
Blondel, V. D., Guillaume, J.-L., Lambiotte, R., & Lefebvre, E. (2008). Fast unfolding of communities in large networks. Journal of statistical mechanics: theory and experiment, 2008(10), P10008.
Clauset, A., Newman, M. E. J., & Moore, C. (2004). Finding community structure in very large networks. Physical review E, 70(6), 066111.
Raghavan, U. N., Albert, R., & Kumara, S. (2007). Near linear time algorithm to detect community structures in large-scale networks. Physical review E, 76(3), 036106. Reichardt, J., & Bornholdt, S. (2006). Statistical mechanics of community detection. Physical review E, 74(1), 016110.
1 2 3 4 5 6 7 8 9 10 | data(Cluster_Example_3,package="i2d")
set.seed(1234)
dat <- i2d(image=Cluster_Example_3, p.n=500)
## Perform graph clustering method based on a community detection algorithm
out <-codeGCluster(dat=dat, wt=4, k=4, method="louvain",diff_distance=0.5)
## Plot the clutered vertices
cols <- rainbow(12, alpha=0.5)
plot(dat, pch=19, col=cols[out$membership], cex=1.2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.