powered by
Generating samples from the distribution
sample.conditional(crf, size, clamped, sample.method, ...)
The CRF
The sample size
The vector of fixed values for clamped nodes, 0 for unfixed nodes
The sampling method to solve the clamped CRF
The parameters for sample.method
sample.method
This function will return a matrix with size rows and crf$n.nodes columns, in which each row is a sampled configuration.
size
crf$n.nodes
Conditional sampling (takes another sampling method as input)
# NOT RUN { library(CRF) data(Small) s <- sample.conditional(Small$crf, 100, c(0,1,0,0), sample.exact) # }
Run the code above in your browser using DataLab