Title: | Implementation of SCORE, SCORE+ and Mixed-SCORE |
---|---|
Description: | Implementation of community detection algorithm SCORE in the paper J. Jin (2015) <arXiv:1211.5803>, and SCORE+ in J. Jin, Z. Ke and S. Luo (2018) <arXiv:1811.05927>. Membership estimation algorithm called Mixed-SCORE in J. Jin, Z. Ke and S. Luo (2017) <arXiv:1708.07852>. |
Authors: | Jiashun Jin [aut], Zheng Tracy Ke [aut], Shengming Luo [aut, cre] |
Maintainer: | Shengming Luo <[email protected]> |
License: | GPL-2 |
Version: | 0.1 |
Built: | 2025-01-20 05:11:15 UTC |
Source: | https://github.com/cran/ScorePlus |
find the maxinum distance from the convex hull formed by the chosen K vertices
getMaxDist(centers, vertex.ind)
getMaxDist(centers, vertex.ind)
centers |
L-by-(K-1) center matrix |
vertex.ind |
index of the |
the maximum distance
calculated the membership of each node given ratio matrix and community centers
getMembership(R, vertices, K, eig.values, eig.vectors)
getMembership(R, vertices, K, eig.values, eig.vectors)
R |
n-by-(K-1) ratio matrix |
vertices |
K-by-(K-1) community centers |
K |
number of communities. |
eig.values |
eigenvalues of adjacency matrix. |
eig.vectors |
eigenvectors of adjacency matrix. |
n-by-K membership matrix
Membership estimation algorithm called mixedSCORE
mixedSCORE(A, K, verbose = F)
mixedSCORE(A, K, verbose = F)
A |
n-by-n binary symmtric adjacency matrix. |
K |
number of communities. |
verbose |
whether generate message |
A list containing
n-by-(K-1) ratio matrix.
Selected tunning parameter used for vertex hunting algorithm.
A vector of the estimated degree heterogeniety parameters
K-by-(K-1) K vertices of the found convex hull
L-by-(K-1) L centers by kmeans
n-by-K membership matrix.
A vector of maximum membership of each node
A vector of integers indicating hard clutering labels, by assigning the node to the cluster with max membership
library(igraphdata) library(igraph) data('karate') A = get.adjacency(karate) karate.mixed.out = mixedSCORE(A, 2) karate.mixed.out$memberships
library(igraphdata) library(igraph) data('karate') A = get.adjacency(karate) karate.mixed.out = mixedSCORE(A, 2) karate.mixed.out$memberships
community detection method called SCORE Spectral Clustering On Ratios-of-Eigenvectors (SCORE)
SCORE(A, K, threshold = NULL)
SCORE(A, K, threshold = NULL)
A |
n-by-n binary symmtric adjacency matrix. |
K |
number of communities. |
threshold |
(optional) the threshold of ratio matrix. By defalt is |
A list containing
n-by-(K-1) ratio matrix.
A vector of integer indicating the cluster to which each point allocated.
library(igraphdata) library(igraph) data('karate') A = get.adjacency(karate) karate.out = SCORE(A, 2) karate.out$labels
library(igraphdata) library(igraph) data('karate') A = get.adjacency(karate) karate.out = SCORE(A, 2) karate.out$labels
community detection method called SCORE+
SCOREplus(A, k, c = 0.1, r = NULL)
SCOREplus(A, k, c = 0.1, r = NULL)
A |
n-by-n binary symmtric adjacency matrix. |
k |
number of communities (>1). |
c |
(optional) tuning parameter for Graph Laplacian, default is 0.1. |
r |
(optional) latent dimension (>1), if not given, chosen between k and k+1 determined by eigen gap |
A list containing
Predicted community labels
n-by-(K-1) or n-by-r ratio matrix.
calculated delta parameter
Top r eigen vectors
Top r eigen values
library(igraphdata) library(igraph) data('karate') A = get.adjacency(karate) karate.plus.out = SCOREplus(A, 2) karate.plus.out$labels
library(igraphdata) library(igraph) data('karate') A = get.adjacency(karate) karate.plus.out = SCOREplus(A, 2) karate.plus.out$labels
Vertex hunting algorithm to find the cluster centers
vertexHunting(R, K, verbose = F)
vertexHunting(R, K, verbose = F)
R |
n-by-(K-1) ratio matrix |
K |
number of communities. |
verbose |
whether or not to show a progress bar |
K
vertices from given L
centersselect the K
vertices from given L
centers
vertexSearch(centers, K)
vertexSearch(centers, K)
centers |
L-by-(K-1) center matrix |
K |
number of communities. |
A list containing
a vector of K
integers indicating the index of selected K
vertices out of L
centers.
The maximum distance from centers to the convex hull formed by the K
selected vertice