Learn R Programming

FusedPCA (version 0.2)

fpca.cluster: Clustering the estimators along the path.

Description

To use k-means to cluster the estimators along the path and get the community labels. fpca.cluster is a wrap up of functions fpca.nonscore.cluster and fpca.score.cluster. The latter two are the clustering functions for the situations in which score = FALSE and score = TRUE, respectively.

Usage

fpca.cluster(obj, K = 2, score = F) fpca.nonscore.cluster(obj, K = 2) fpca.score.cluster(obj, K = 2)

Arguments

obj
in function fpca.cluster, it is an object generated by fpca.start, i.e., generated by fpca.nonscore or fpca.score, if score = FALSE or score = TRUE, respectively. It is a list.

In functions fpca.nonscore.cluster and fpca.score.cluster, it is an input matrix, which is a FPCA or FPCA-RoE object, of dimension number of non-isolated nodes x number of effective estimators. It is generated by fpca.nonscore and fpca.score.

K
input integer -- the pre-specified number of communities, with the default value 2.
score
indicator argument -- whether to apply the score associated clustering method or not, with the default value FALSE.

Value

an array of community labels list, of dimension number of non-isolated nodes x number of effective estimators. Each entry has value from 1 to K, as an index of the community label. Notice, the community labels are usually permutation-invariant.

Warning

if the input object obj is a FPCA object, the supposed value for score should be F. If users set score = T, the function will stop with warning 'This object is designed for 'score = F''. If the input object obj is a FPCA-RoE object, the supposed value for score should be T. If users set score = F, the function will still execute, but with warning 'This object is designed for 'score = T''.

References

Yang Feng, Richard J. Samworth and Yi Yu, Community Detection via Fused Principal Component Analysis, manuscript. Holland, P.W., Laskey, K.B. and Leinhardt, S., 1983. Stochastic block models: first steps. Social Networks 5, 109-137. Jin, J., 2012. Fast community detection by score. Karrer, B. and Newman, M.E.J., 2011. Stochastic blockmodels and community structure in networks. Physical Review E 83, 016107.

See Also

fpca.nonscore.cluster, fpca.score.cluster, fpca.start, fpca.nonscore, fpca.score.

Examples

Run this code
### please see the examples in fpca

Run the code above in your browser using DataLab