View source: R/sample_edge_probabilities.R
SampleEdgeProbabilities | R Documentation |
Sample edge probabilities
SampleEdgeProbabilities(x)
x |
A chain(s) or collection object where states are DAGs. |
p_edge A posterior sample for the marginalised edge probabilities.
data <- bnlearn::learning.test
dag <- UniformlySampleDAG(colnames(data))
partitioned_nodes <- DAGtoPartition(dag)
scorer <- CreateScorer(
scorer = BNLearnScorer,
data = data
)
results <- SampleChains(10, partitioned_nodes, PartitionMCMC(), scorer)
dag_chains <- PartitiontoDAG(results, scorer)
pedge_sample <- SampleEdgeProbabilities(dag_chains)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.