PostProcessChains | R Documentation |
This allows you to remove a burnin and thin the chains after processing. This is mostly redundant as you can now index the cia_chain(s) objects directly.
PostProcessChains(chains, n_burnin = 0, n_thin = 1)
chains |
cia_chain(s) object. |
n_burnin |
Number of steps to remove at the start as a burnin. Default is 0. |
n_thin |
Number of steps between retained states. Default is 1. |
A cia_chain(s) object.
data <- bnlearn::learning.test
dag <- UniformlySampleDAG(colnames(data))
partitioned_nodes <- DAGtoPartition(dag)
scorer <- CreateScorer(
scorer = BNLearnScorer,
data = data
)
results <- SampleChains(100, partitioned_nodes, PartitionMCMC(), scorer)
thinned_results <- PostProcessChains(results, n_thin = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.