compute_optimal_clustering: Compute the optimal clustering from an MCMC sample
Description
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.
A vector of integers with the same size as the data, indicating the allocation of each data point.
Arguments
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".