View source: R/posterior_clustering_analysis.R
compute_optimal_clustering | R Documentation |
Summarizes the posterior on all possible clusterings by an optimal clustering where optimality is defined as minimizing the posterior expectation of a specific loss function. Supports GreedyEPL and SALSO.
compute_optimal_clustering(fit, method = "GreedyEPL", loss_type = "VI")
fit |
The fitted object, obtained from one of the MixNRMIx functions |
method |
The method to use for optimal clustering. Can be "GreedyEPL" or "SALSO". Defaults to "GreedyEPL". |
loss_type |
Defines the loss function to be used in the expected posterior loss minimization. Only used if method is "GreedyEPL". Can be one of "VI", "B", "NVI", or "NID". Defaults to "VI". |
A vector of integers with the same size as the data, indicating the allocation of each data point.
## Not run:
data(acidity)
x <- acidity
# Fitting the model under default specifications
out <- MixNRMI1(x)
compute_optimal_clustering(out)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.