powered by
Generating samples from the distribution
sample.chain(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 chain-structured graphs with the forward-filter backward-sample algorithm
# NOT RUN { library(CRF) data(Small) s <- sample.chain(Small$crf, 100) # }
Run the code above in your browser using DataLab