sample.exact {CRF} | R Documentation |
Generating samples from the distribution
sample.exact(crf, size)
crf |
The CRF |
size |
The sample size |
Exact sampling for small graphs with brute-force inverse cumulative distribution
This function will return a matrix with size
rows and crf$n.nodes
columns,
in which each row is a sampled configuration.
library(CRF)
data(Small)
s <- sample.exact(Small$crf, 100)