SampleChains | R Documentation |
Sample chains
SampleChains(
n_results,
init_state,
transition,
scorer,
n_thin = 1,
n_parallel_chains = 2
)
n_results |
Number of saved states per chain. |
init_state |
An initial state that can be passed to transition. This can be a single state or a list of states for each parallel chain. |
transition |
A transition function. |
scorer |
A scorer object. |
n_thin |
Number of steps between saved states. |
n_parallel_chains |
Number of chains to run in parallel. Default is 2. |
A cia_chains object.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.