sample.cutset {CRF} | R Documentation |
Sampling method for graphs with a small cutset
Description
Generating samples from the distribution
Usage
sample.cutset(crf, size, cutset, engine = "default")
Arguments
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". |
Details
Exact sampling for graphs with a small cutset using cutset conditioning
Value
This function will return a matrix with size
rows and crf$n.nodes
columns,
in which each row is a sampled configuration.
Examples
library(CRF)
data(Small)
s <- sample.cutset(Small$crf, 100, c(2))
[Package CRF version 0.4-3 Index]