Skip to content

Commit

Permalink
Updated directional accuracy because it was returning negative zeros.
Browse files Browse the repository at this point in the history
  • Loading branch information
djpasseyjr committed Sep 25, 2024
1 parent ce52693 commit 047e987
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions interfere/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,11 @@ def directional_change(self, X: np.ndarray, Y: np.ndarray, p_val_cut):

# Keep only whether the change in mean was positive, negative or no
# change (zero)
estimated_change[estimated_change < 0] = -1
estimated_change[estimated_change > 0] = 1
estimated_change[estimated_change < 0] = -1.0
estimated_change[estimated_change > 0] = 1.0

# Get rid of negative zeros.
estimated_change += 0.0
return estimated_change


Expand Down

0 comments on commit 047e987

Please sign in to comment.