Repository navigation
Commit ba59ee7
committed
fix(metrics): count true positives for bool inputs in get_f_beta_score
get_f_beta_score has the same (y_pred + y) == 2 true-positive test as
get_confusion_matrix; both lost their float casts in #7187. For bool masks
the sum is a logical OR, so every true positive was dropped and a perfect
prediction scored F-beta 0. Cast bool inputs to float before counting, as
in the previous commit; float and integer inputs are unchanged.
Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: tritsystem <gbranaa4@gmail.com>1 parent 9f4176b commit ba59ee7
2 files changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
78 | 95 | | |
79 | 96 | | |
80 | 97 | | |
0 commit comments