Title: | Random Perturbation of Count Matrices |
---|---|
Description: | The perturbR() function incrementally perturbs network edges (using the rewireR function)and compares the resulting community detection solutions from the rewired networks with the solution found for the original network. These comparisons aid in understanding the stability of the original solution. The package requires symmetric, weighted (specifically, count) matrices/networks. |
Authors: | KM Gates [aut, cre], Zachary Fisher [aut], Cara Arizmendi [aut] |
Maintainer: | KM Gates <[email protected]> |
License: | GPL-2 |
Version: | 0.1.3 |
Built: | 2025-02-14 04:57:17 UTC |
Source: | https://github.com/cran/perturbR |
The perturbR function incrementally perturbs networks (using the rewireR function) and compares the resulting rewired networks with the orignal. These comparisons aid in understanding the stability of the cluster solution.
KM Gates [aut, cre],
Zachary Fisher [aut],
Cara Arizmendi [aut]
Maintainer: KM Gates [email protected]
This object contains a simulated 25 by 25 symmetric, weighted count matrix.
exampledata
exampledata
A 25 by 25 symmetric count matrix.
Randomly rewires networks in increasing degrees of perturbation to evaluate stability of community solutions obtained from Walktrap.
perturbR(sym.matrix, plot = TRUE, resolution = 0.01, reps = 100, errbars = FALSE)
perturbR(sym.matrix, plot = TRUE, resolution = 0.01, reps = 100, errbars = FALSE)
sym.matrix |
A symmetric, sparse count matrix object |
plot |
Logical, defaults to TRUE |
resolution |
The percentage of edges to iteratively alter. One percent is default, increase to go quicker. |
reps |
The number of repititions to do for each level of perturbation. Decrease to make it go quicker. |
errbars |
Logical, defaults to FALSE. Option to add error bars of one standard deviation above and below the mean for each point. |
perturbR(exampledata, plot=FALSE, resolution=0.10, reps=1, errbars = FALSE)
perturbR(exampledata, plot=FALSE, resolution=0.10, reps=1, errbars = FALSE)
Randomly rewires graphs by altering a specific number of edges using Bernoulli trials as described in "The weighted random graph model" by Garlaschelli, New Journal of Physics, 11, (2009), 073005. Only undirected, weigghted count matrices are considered here.
rewireR(sym.matrix, nperturb, dist)
rewireR(sym.matrix, nperturb, dist)
sym.matrix |
A symmetric, sparse count matrix object. |
nperturb |
The number of edges to randomly alter. |
dist |
Option to rewire in a manner that retains overall graph weight regardless of distribution of edge weights. This option is invoked by putting any text into this field. Defaults to "NegBinom" for negative binomial. |
rewireR(exampledata, nperturb=40, dist = "Normal")
rewireR(exampledata, nperturb=40, dist = "Normal")