Skip to content

Using multiple initial partitions in bicriterion_anticlustering() #56

@m-Py

Description

@m-Py

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions