The documentation of bicriterion_anticlustering() states: "If multiple init_partitions are given, ensure that each partition (i.e., each row of init_partitions) has the exact same output of table()."
This is bad and it should not be up to the user. I can do that in anticlust, I already do it in the internal function add_unassigned_elements():
# now sort labels by group size (so that each time this function is called, we get the same output of table())
new_labels <- order(table(init), decreasing = TRUE)
as.numeric(as.character(factor(init, levels = 1:K, labels = new_labels)))
--> Use this code in bicriterion_anticlustering() if the argument init_partitions is used.
The documentation of
bicriterion_anticlustering()
states: "If multipleinit_partitions
are given, ensure that each partition (i.e., each row ofinit_partitions
) has the exact same output oftable()
."This is bad and it should not be up to the user. I can do that in
anticlust
, I already do it in the internal functionadd_unassigned_elements()
:--> Use this code in
bicriterion_anticlustering()
if the argumentinit_partitions
is used.