sample.junction {CRF} | R Documentation |
Sampling method for low-treewidth graphs
Description
Generating samples from the distribution
Usage
sample.junction(crf, size)
Arguments
crf |
The CRF |
size |
The sample size |
Details
Exact sampling for low-treewidth graphs using junction trees
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.junction(Small$crf, 100)
[Package CRF version 0.4-3 Index]