SCORE: Fast Community Detection

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/main.R

Description

SCORE(A,K,...) detects communities in a network by the SCORE (Spectral Clustering On Ratio-of-Eigenvector) algorithm.

Usage

1
SCORE(A,K,mode="collapse")

Arguments

A

an igraph object that represents an undirected network.

K

an integer indicating the number of communities in the network

mode

an optional character constant that defines the conversion algorithm if the input igraph object A is directed

Details

The input graph should be undirected. If the graph is directed, mixedSCORE will use as.undirected in the igraph package for conversion. By default, mixedSCORE uses the collapse mode. For details on the conversion algorithm, see as.undirected.

The leading eigenvector of the adjacency matrix of A should have strictly positive components. Otherwise, mixedSCORE will extract the giant component of the network, and positive components of the leading eigenvector are guaranteed by the Perron-Frobenius theorem.

Value

SCORE returns an object of class SCORE, which is a list containing the following components:

community

the n-dimensional community vector, where n is the number of nodes. The i-th component of the vector indicate which community the i-th node belongs to.

direct

a character indicating the conversion algorithm if the graph is converted. If NULL, the input graph is undirected and does not need conversion.

gc

a list of character that contains the names of nodes that are not in the giant component, if the giant component is extracted from the network. If NULL, the giant component is not extracted.

R

the n by K-1 matrix whose columns represent the ratio of eigenvectors of the adjacency matrix.

Author(s)

Tracy Ke, Lijia Zhou and Qi Zhu.

Maintainer: Lijia Zhou <zlj@uchicago.edu>, Qi Zhu <qizhu@uchicago.edu>.

References

Jiashun Jin (2012) "Fast Community Detection By SCORE", Manuscript.

See Also

as.undirected, mixedSCORE, and topicSCORE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# karate contains the network of friendships between the 34
# members of a karate club at a US university, as described 
# by Wayne Zachary in 1977.

# W. W. Zachary, An information flow model for conflict 
# and fission in small groups, Journal of Anthropological
# Research 33, 452-473 (1977).

data(karate)

fit = SCORE(karate,2)
summary(fit)

fit$community

zhoulijia/SCORE documentation built on May 18, 2019, 9:15 p.m.