library(bionetdata);
data(FIN.data);
W <- Laplacian.norm(as.matrix(FIN.data));
# sparsification with 10 neighbours per node
W10 <- Sparsify.matrix.fixed.neighbours(W);
# sparsification with 20 neighbours per node
W20 <- Sparsify.matrix.fixed.neighbours(W, k=20);
Run the code above in your browser using DataLab