Description Usage Arguments Author(s) References Examples
The minimum spanning tree-based graph clustering algorithm (mstGCluster) not only can be used to group the vertices into a specific number of clusters but also can filter the noise in the graph.
1 | mstGCluster(dat=dat, k=2, filter=FALSE, filter.n=10, filter.d=0)
|
dat |
data.frame or matrix of x-coordinate and y-coordinate. |
k |
integer: number of clusters. Default is |
filter |
logical: if |
filter.n |
integer: minimum number of vertices of each cluster. If |
filter.d |
a positive value: this argument specifies the minimum distance of vertices that not be filtered. If |
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(Noise_Filtering,package="i2d")
dat1 <- i2d(image=Noise_Filtering, p.n=500);
out1 <- mstGCluster(dat=dat1, k=2, filter=TRUE, filter.n=10);
col1 <- rainbow(10, alpha=0.5)[c(1,2,7,9)];
## The original image
EBImage::display(Noise_Filtering)
## Plot the 500 randomly selected vertices
plot(dat1, col="black", pch=19, main="Raw Data");
## Outliers detection
plot(out1$outlier, col="black", pch=19, main="Outliers Filtered Before Clustering");
## Plot the clusters after flitering noise
plot(out1$dat, col=col1[out1$clu$membership], pch=19, main="Cluster After Filtering")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.