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 igraph network, or edge list formatted | n1 | n2 | weight | with colnames c("n1", "n2", "weight").

directed

If TRUE, specifies that the inputted network is directed. Default is FALSE.

associative

Designates if the network is associative where edge weight determines "similarity" or "strength" or dissociative where edge weight denotes "dissimilarity" or "distance".
If the network is associative, then the shortest path would be found by looking at w_e^-1 where weaker association between nodes suggests a larger distance between nodes for shortest paths.
If the network is dissociative, then the shortest path would be between w_e.

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

[Package simplifyNet version 0.0.1 Index]