Sample chains
Arguments
- 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.
Examples
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)