Using Neal's algorithm 4 or 8 depending on conjugacy the sampling procedure for a Dirichlet process is carried out. Lists of both cluster parameters, weights and the sampled concentration values are included in the fitted dpObj. When update_prior is set to TRUE the parameters of the base measure are also updated.

Fit(dpObj, its, updatePrior = FALSE, progressBar = TRUE)

Arguments

dpObj

Initialised Dirichlet Process object

its

Number of iterations to use

updatePrior

Logical flag, defaults to FAlSE. Set whether the parameters of the base measure are updated.

progressBar

Logical flag indicating whether to display a progress bar.

Value

A Dirichlet Process object with the fitted cluster parameters and labels.

References

Neal, R. M. (2000). Markov chain sampling methods for Dirichlet process mixture models. Journal of computational and graphical statistics, 9(2), 249-265.