MinimiseEPL {GreedyEPL} | R Documentation |
MinimiseEPL
Description
Performs greedy optimisation to find the Bayes optimal decision given a collection (sample) of partitions.
Usage
MinimiseEPL(sample_of_partitions, pars = list())
Arguments
sample_of_partitions |
A |
pars |
A list of additional parameters. See 'Details'. |
Details
weights
: a vector of sizeT
assigning a positive weight to each of the partitions in the sample. The vector does not have to be normalised but its entries must be positive numbers. If unspecified all weights are set to 1.Kup
: positive integer identifying the number of groups used to generate the random initial partition. Defaults toN
.decision_init
: a vector of sizeN
identifying the partition used to initialise the greedy algorithm. Entries must be integers greater than one. The default issample(1:Kup, N, TRUE)
. Note that the number of groups in the initial partition also corresponds to the maximum number of groups allowed.loss_type
: defines the loss function to be used in the expected posterior loss minimisation. Can be one of"VI"
(Variation of Information),"B"
(Binder's loss),"NVI"
(Normalised Variation of Information) or"NID"
(Normalised Information Distance). Defaults to"VI"
.
See Also
Examples
set.seed(123)
N <- 10
niter <- 50
Kup <- 3
sample_of_partitions <- matrix(sample(x = 1:Kup, size = niter*N, replace = TRUE),niter,N)
loss_type = "VI"
output <- MinimiseEPL(sample_of_partitions, list(Kup = Kup, loss_type = loss_type))
output$decision
output$EPL