bestpath {simplifyNet} | R Documentation |
Sparsification via Best Path
Description
Calculates network sparsifier from best path
Usage
bestpath(network, directed = FALSE, associative = TRUE)
Arguments
network |
Weighted adjacency matrix, weighted |
directed |
If |
associative |
Designates if the network is associative where edge weight determines "similarity" or "strength" or dissociative where edge weight denotes "dissimilarity" or "distance". |
Value
Edge list of sparsified network via best path.
Author(s)
Alexander Mercier
Andrew Kramer
References
Toivonen, H., Mahler, S., & Zhou, F. (2010, May). A framework for path-oriented network simplification. In International Symposium on Intelligent Data Analysis (pp. 220-231). Springer, Berlin, Heidelberg.
Examples
#Generate random ER graph with uniformly random edge weights
g = igraph::erdos.renyi.game(50, 0.1)
igraph::E(g)$weight <- runif(length(igraph::E(g)))
#Sparsify g via bestpath
S = simplifyNet::bestpath(g, directed = FALSE, associative = TRUE) #Show edge list conversion
sg = simplifyNet::net.as(S, net.to="igraph", directed=FALSE)
igraph::ecount(sg)/igraph::ecount(g)#fraction of edges in the sparsifier