sample.cutset: Sampling method for graphs with a small cutset

Description Usage Arguments Details Value Examples

View source: R/sample.R

Description

Generating samples from the distribution

Usage

1
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

1
2
3
library(CRF)
data(Small)
s <- sample.cutset(Small$crf, 100, c(2))

CRF documentation built on Dec. 1, 2019, 3:02 a.m.