Skip to content

Commit

Permalink
Add information about unique_labels sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-narozniak committed Jul 10, 2024
1 parent 0ec1317 commit 1a2698e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class PathologicalPartitioner(Partitioner):
- "random": Randomly assign classes to the partitions. For each partition choose
the `num_classes_per_partition` classes without replacement.
- "first-deterministic": Assign the first class for each partition in a
deterministic way (class is the partition_id%num_unique_classes).
deterministic way (class id is the partition_id % num_unique_classes).
The rest of the classes are assigned randomly. In case the number of
partitions is smaller than the number of unique classes, not all classes will
be used in the first iteration, otherwise all the classes will be used (such
Expand All @@ -65,6 +65,8 @@ class PathologicalPartitioner(Partitioner):
classes 0, 1, 2, ..., `num_classes_per_partition`-1, partition 1 will have
classes 1, 2, 3, ...,`num_classes_per_partition`, ....
The list representing the unique lables is sorted in ascending order. In case
of numbers starting from zero the class id corresponds to the number itself.
`class_assignment_mode="first-deterministic"` was used in the orginal paper,
here we provide the option to use the other modes as well.
shuffle: bool
Expand Down

0 comments on commit 1a2698e

Please sign in to comment.