Skip to content

Commit bd3a6b4

Browse files
authored
Merge pull request #16 from ytchoutw/main
Add safguard to avoid NAN on leaderboard
2 parents c203f09 + 499a9ef commit bd3a6b4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gw_challenge/scoring_program/scoring.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ def main():
7979
TNR = tn / (fp + tn)
8080
print("TNR: ", TNR)
8181

82+
# Avoid TNR = NaN
83+
if np.isnan(TNR):
84+
TNR = 0.0
85+
print("TNR is NaN, setting to 0.0")
86+
8287
# Write Score
8388
print_pretty('Saving prediction')
8489
save_score(TNR)

0 commit comments

Comments
 (0)