Burnin: Run the Gibbs sampling burnin (one thread)

View source: R/Burnin.R

BurninR Documentation

Run the Gibbs sampling burnin (one thread)

Description

Run the Gibbs sampling burnin (one thread)

Usage

Burnin(
  hdp.state,
  seedNumber = 1,
  burnin = 5000,
  cpiter = 3,
  burnin.verbosity = 0,
  burnin.multiplier = 2,
  checkpoint = TRUE
)

Arguments

hdp.state

An hdpState-class object or a list representation of an hdpState-class object.

seedNumber

Set the random seed to this value.

burnin

The number of burn-in iterations in one batch. The total number of burnin iterations is burnin * burnin.multiplier.

cpiter

The number of iterations of concentration parameter sampling to perform after each main Gibbs-sample iteration. (See Teh et al., "Hierarchical Dirichlet Processes", Journal of the American Statistical Association 2006;101(476):1566-1581 (https://doi.org/10.1198/016214506000000302).)

burnin.verbosity

Verbosity of message statements.

burnin.multiplier

Run burnin.multiplier rounds of burnin iterations. If checkpoint is TRUE, save the burnin chain (see parameter checkpoint.) The diagnostic plot diagnostics.likelihood.pdf can help determine if the chain is stationary. The burnin can be continued from a checkpoint file with ExtendBurnin (see argument checkpoint).

checkpoint

If TRUE, create a checkpoint file called mSigHdp.burnin.checkpoint.seedNumber.Rdata in the current working directory.

Value

A list with 2 elements:

hdplist

A list representation of an hdpState-class object.

likelihood

A numeric vector with the likelihood at each iteration.

This is the same type as returned from link[hdp]{hdp_burnin} in package hdpx.


steverozen/mSigHdp documentation built on Feb. 6, 2023, 1:36 a.m.