sample.conditional {CRF} | R Documentation |
Conditional sampling method
Description
Generating samples from the distribution
Usage
sample.conditional(crf, size, clamped, sample.method, ...)
Arguments
crf |
The CRF |
size |
The sample size |
clamped |
The vector of fixed values for clamped nodes, 0 for unfixed nodes |
sample.method |
The sampling method to solve the clamped CRF |
... |
The parameters for |
Details
Conditional sampling (takes another sampling method as input)
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.conditional(Small$crf, 100, c(0,1,0,0), sample.exact)
[Package CRF version 0.4-3 Index]