View source: R/posterior_clusters.R
PosteriorClusters | R Documentation |
Using the stick breaking representation the user can draw the posterior clusters and weights for a fitted Dirichlet Process.
See also PosteriorFunction
.
PosteriorClusters(dpobj, ind)
dpobj |
Fitted Dirichlet process |
ind |
Index for which the posterior will be drawn from. Defaults to the last iteration of the fit. |
A list with the weights and cluster parameters that form the posterior of the Dirichlet process.
y <- rnorm(10)
dp <- DirichletProcessGaussian(y)
dp <- Fit(dp, 5)
postClusters <- PosteriorClusters(dp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.