Commit 0f6cddd
committed
fix: extend zero_division to percentage metrics
Add zero_division to ape, mape, sape, smape, wmape, ope, arre, marre, and coefficient_of_variation.
Share denominator handling with scaled metrics while preserving their near-zero behavior. Percentage and range metrics use exact zeros: 0/0 returns 0.0, nonzero/0 returns NaN, and raise keeps explicit failure behavior.
Handle zero ranges element-wise, allow negative OPE sums, and keep missing-only WMAPE and OPE inputs as NaN.1 parent 0996a2f commit 0f6cddd
4 files changed
Lines changed: 445 additions & 91 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
0 commit comments