Sample a symmetric adjacency from a random-graph family
Source:R/02_02_generate_synthetic_networks.R
generate_random_network_skeleton.RdDraws undirected skeletons with igraph: Erdős–Rényi
(erdos_renyi), hub / star modules (hub), Barabási–Albert
preferential attachment (scale_free), a stochastic block model
(stochastic_block_model), or Watts–Strogatz small-world
(small_world)
(Barabási and Albert 1999)
.
Usage
generate_random_network_skeleton(n_genes, graph_model, graph_params = list())Arguments
- n_genes
Integer \(G\), number of nodes (genes).
- graph_model
One of
"erdos_renyi","hub","scale_free","stochastic_block_model","small_world".- graph_params
Named list of generator parameters:
erdos_renyipedge probability forigraph::sample_gnp()(default targets average degree about 2)hubn_hubs: partition nodes into that many groups and connect each group's hub to all other members (star modules)scale_freepower,edges_per_node(minigraph::sample_pa())stochastic_block_modelblock_prob,p_within,p_betweensmall_worldnei,p(rewiring probability) forigraph::sample_smallworld()