mcmcPotts: Fit the hidden Potts model using a Markov chain Monte Carlo...

Description Usage Arguments Value

View source: R/mcmcPotts.R

Description

Fit the hidden Potts model using a Markov chain Monte Carlo algorithm.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
mcmcPotts(
  y,
  neighbors,
  blocks,
  priors,
  mh,
  niter = 55000,
  nburn = 5000,
  truth = NULL
)

Arguments

y

A vector of observed pixel data.

neighbors

A matrix of all neighbors in the lattice, one row per pixel.

blocks

A list of pixel indices, dividing the lattice into independent blocks.

priors

A list of priors for the parameters of the model.

mh

A list of options for the Metropolis-Hastings algorithm.

niter

The number of iterations of the algorithm to perform.

nburn

The number of iterations to discard as burn-in.

truth

A matrix containing the ground truth for the pixel labels.

Value

A matrix containing MCMC samples for the parameters of the Potts model.


bayesImageS documentation built on April 11, 2021, 5:06 p.m.