Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 12, 2024
1 parent eca8031 commit 80ba914
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modulation/classification/metrics/lwlrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ class within the truth labels. Then the overall unbalanced lwlrap is
pos_class_indices, precision_at_hits = one_sample_positive_class_precisions(
scores[sample_num, :], truth[sample_num, :]
)
precisions_for_samples_by_classes[
sample_num, pos_class_indices
] = precision_at_hits
precisions_for_samples_by_classes[sample_num, pos_class_indices] = (
precision_at_hits
)
labels_per_class = numpy.sum(truth > 0, axis=0)
weight_per_class = labels_per_class / float(numpy.sum(labels_per_class))
# Form average of each column, i.e. all the precisions assigned to labels in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def violet_noise(length: int, seed: int = None) -> numpy.ndarray:

class GaussianNoiseTypeEnum(Enum):
r"""description"""

white = partial(
white_noise
) # Partial to workaround interpreting as a method definition
Expand Down

0 comments on commit 80ba914

Please sign in to comment.