Skip to content

Commit

Permalink
minor adjustment to docstrings/comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jafermarq committed Feb 29, 2024
1 parent 8c30794 commit bf35a21
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class InnerDirichletPartitioner(Partitioner): # pylint: disable=R0902
The sizes of all partitions.
partition_by : str
Column name of the labels (targets) based on which Dirichlet sampling works.
alpha : Union[float, List[float], NDArrayFloat]
alpha : Union[int, float, List[float], NDArrayFloat]
Concentration parameter to the Dirichlet distribution
shuffle: bool
Whether to randomize the order of samples. Shuffling applied after the
Expand Down Expand Up @@ -120,7 +120,7 @@ def _initialize_alpha_if_needed(
Parameters
----------
alpha : Union[float, List[float], NDArrayFloat]
alpha : Union[int, float, List[float], NDArrayFloat]
Concentration parameter to the Dirichlet distribution
Returns
Expand Down Expand Up @@ -210,7 +210,7 @@ def _determine_node_id_to_indices_if_needed(self) -> None: # pylint: disable=R0
curr_class = self._rng.choice(
list(range(self._num_unique_classes)), p=current_probabilities
)
# Redraw class label if there are no samples left to allocated from
# Redraw class label if there are no samples left to be allocated from
# that class
if class_sizes[curr_class] == 0:
# Class got exhausted, set probabilities to 0
Expand Down

0 comments on commit bf35a21

Please sign in to comment.