View source: R/dbn_visualization.R
plot_static_network | R Documentation |
This function calculates the levels of each node and then plots them in a hierarchical layout in visNetwork. Can be used in place of the generic plot function offered by bnlearn for "bn" and "bn.fit" S3 objects.
plot_static_network(structure)
structure |
the structure or fit of the network. |
dt_train <- dbnR::motor[200:2500]
net <- bnlearn::mmhc(dt_train)
plot_static_network(net)
fit <- bnlearn::bn.fit(net, dt_train, method = "mle-g")
plot_static_network(fit) # Works for both the structure and the fitted net
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.