sparsify.with.lspar
is a wrapper for sparsify()
that extracts the L-spar backbone described by Satuluri et al. (2011).
It is equivalent to sparsify(escore = "jaccard", normalize = "rank", filter = "degree", umst = FALSE)
.
sparsify.with.lspar(U, s, class = "original", narrative = FALSE)
numeric: Sparsification exponent, 0 < s < 1; smaller values yield sparser graphs
string: the class of the returned backbone graph, one of c("original", "matrix", "sparseMatrix", "igraph", "network", "edgelist").
If "original", the backbone graph returned is of the same class as U
.
boolean: TRUE if suggested text & citations should be displayed.
An unweighted, undirected, unipartite graph of class class
.
Satuluri, V., Parthasarathy, S., & Ruan, Y. (2011, June). Local graph sparsification for scalable clustering. In Proceedings of the 2011 ACM SIGMOD International Conference on Management of data (pp. 721-732). 10.1145/1989323.1989399
# NOT RUN {
U <- igraph::sbm.game(60, matrix(c(.75,.25,.25,.25,.75,.25,.25,.25,.75),3,3), c(20,20,20))
plot(U) #A hairball
sparse <- sparsify.with.lspar(U, s = 0.6, narrative = TRUE)
plot(sparse) #Clearly visible communities
# }
Run the code above in your browser using DataLab