sparsify.with.gspar {backbone}R Documentation

Extract Satuluri et al's (2011) G-spar backbone

Description

sparsify.with.gspar is a wrapper for sparsify() that extracts the G-spar backbone described by Satuluri et al. (2011). It is equivalent to sparsify(escore = "jaccard", normalize = "none", filter = "proportion", umst = FALSE).

Usage

sparsify.with.gspar(U, s, class = "original", narrative = FALSE)

Arguments

U

An unweighted unipartite graph, as: (1) an adjacency matrix in the form of a matrix or sparse Matrix; (2) an edgelist in the form of a two-column dataframe; (3) an igraph object.

s

numeric: Proportion of edges to retain, 0 < s < 1; smaller values yield sparser graphs

class

string: the class of the returned backbone graph, one of c("original", "matrix", "Matrix", "igraph", "edgelist"). If "original", the backbone graph returned is of the same class as U.

narrative

boolean: TRUE if suggested text & citations should be displayed.

Value

An unweighted, undirected, unipartite graph of class class.

References

package: Neal, Z. P. (2022). backbone: An R Package to Extract Network Backbones. PLOS ONE, 17, e0269137. doi:10.1371/journal.pone.0269137

model: 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). doi:10.1145/1989323.1989399

Examples

U <- igraph::sample_sbm(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.gspar(U, s = 0.4, narrative = TRUE)
plot(sparse) #Clearly visible communities

[Package backbone version 2.1.4 Index]