sample.cutset {CRF} | R Documentation |
Generating samples from the distribution
sample.cutset(crf, size, cutset, engine = "default")
crf |
The CRF |
size |
The sample size |
cutset |
A vector of nodes in the cutset |
engine |
The underlying engine for cutset sampling, possible values are "default", "none", "exact", "chain", and "tree". |
Exact sampling for graphs with a small cutset using cutset conditioning
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.cutset(Small$crf, 100, c(2))