powered by
Generating samples from the distribution
sample.tree(crf, size)
The CRF
The sample size
This function will return a matrix with size rows and crf$n.nodes columns, in which each row is a sampled configuration.
size
crf$n.nodes
Exact sampling for tree- and forest-structured graphs with sum-product belief propagation and backward-sampling
# NOT RUN { library(CRF) data(Small) s <- sample.tree(Small$crf, 100) # }
Run the code above in your browser using DataLab