mrfse_sample: Generate a independent sample of a Markov random field

mrfse.sampleR Documentation

Generate a independent sample of a Markov random field

Description

Generate a independent sample of a Markov random field according to the probilities of the sampler.

Usage

mrfse.sample(sampler, n)

Arguments

sampler

A sampler created by mrfse.create.sampler function

n

Size of sample

Value

A matrix whose number of columns is the number of nodes. Each line is a single independent sample of Markov random field given by the probabilites of sampler.

Author(s)

Rodrigo Carvalho

Examples

library(mrfse)
adj = matrix(c(0, 1, 0, 0, 0, 0, 0, 1, 0), byrow=TRUE, ncol=3)
sampler = mrfse.create.sampler(adj, 3)
mrfse.sample(sampler, 3000)

mrfse documentation built on Nov. 16, 2022, 5:06 p.m.

Related to mrfse_sample in mrfse...