#devtools::install_github("robertness/lucy") library(lucy)
Some functions that generate highly connected DAGs that are common in neural networks, neural networks, signaling networks, and Bayesian networks.
Simulate a directed acyclic graph (DAG).
g <- sim_DAG(10) igraphviz(g)
Simulate a multi-layer perceptron structure.
g <- mlp_graph(c("I1", "I2"), c("O1", "O2", "O3"), c(3, 2, 4)) igraphviz(g)
Simulate a DAG composed of stacked layers (a generalization of a mulilayer perceptron).
g <- layer_DAGs(3, 4) igraphviz(g)
Given a input network that has a power-law degree distribution (scale-free network), fit the parameters of that power law and simulate a new network based on that fit. The simulated graph need not have the same amount of vertices as the input graph.
power_law_graph <- barabasi.game(40) sim_graph <- power_law_sim(power_law_graph, 40) par(mfrow=(c(1, 2))) igraphviz(power_law_graph, main = "Input Graph") igraphviz(sim_graph, main = "Simulated Graph")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.