Description Usage Arguments Value Functions Examples
View source: R/Real-networks.R
For a given graph and probability p, this procedure randomly flips edges with probability p and then matches the noisy graph to the original starting at the "true" correspondence. This procedure is run nmc times for each p in p_grid. See local_gm_errors. par_run_all_gm runs this once for each graph in the package, corresponding to the simulation in the manuscript.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | shuffle_gm_sim(
graph,
cl = NULL,
p_grid = 10^(-seq(0.5, 4, length.out = 8)),
nmc = 30,
ask = TRUE
)
par_run_all_gm(
data_df = NULL,
nmc = 30,
p_grid = 10^(-seq(0.5, 4, length.out = 8)),
ask = TRUE
)
|
graph |
Graph to run on |
cl |
Cluster generated by parallel::makeCluster. If NULL then not run in parallel. |
p_grid |
Grid of error probabilities |
nmc |
number of Monte Carlo replicates |
ask |
Whether to warn about long run times. |
data_df |
A tibble that is a subset of |
A list of lists of graph mathching results for each p in p_grid
par_run_all_gm
:
1 2 | shuffle_gm_sim(karate, p_grid = c(0.01, 0.1),
nmc = 2, ask = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.