Sparsify.matrix-methods {NetPreProc} | R Documentation |
Sparsifying the graph
Description
Methods to sparsify a network matrix. By this method a general threshold is et such that you a minimum of k edges is guranteed for each node
Usage
Sparsify.matrix(W, k=1)
Arguments
W |
an object representing the graph to be sparsified |
k |
the number of guaranteed edges for each node (def.=1) |
Value
The sparsified adjacency matrix of the network
Methods
signature(W = "graph")
-
an object of the virtual class graph (hence including objects of class
graphAM
andgraphNEL
from the package graph) signature(W = "matrix")
-
a matrix representing the adjacency matrix of the graph
Examples
library(bionetdata);
data(FIN.data);
W <- Laplacian.norm(as.matrix(FIN.data));
# sparsification by maintaining at least one neighbour per node
W1 <- Sparsify.matrix(W);
# sparsification by maintaining at least 20 neighbours per node (if any)
W20 <- Sparsify.matrix(W, k=20);
[Package NetPreProc version 1.2 Index]