sample.junction function

Sampling method for low-treewidth graphs

Sampling method for low-treewidth graphs

Generating samples from the distribution

sample.junction(crf, size)

Arguments

  • crf: The CRF
  • size: The sample size

Returns

This function will return a matrix with size rows and crf$n.nodes columns, in which each row is a sampled configuration.

Details

Exact sampling for low-treewidth graphs using junction trees

Examples

library(CRF) data(Small) s <- sample.junction(Small$crf, 100)
  • Maintainer: Ling-Yun Wu
  • License: GPL (>= 2)
  • Last published: 2019-12-01