Repository navigation
Commit 9e16f46
Add epsilon to MTER progress postfix to prevent ZeroDivisionError (#723)
When every sampled BPR pair is skipped (e.g. on very small datasets where
all sampled pairs have equal ratings), n_bpr_samples - skipped is 0 and
computing the "correct" percentage raises ZeroDivisionError. Add + 1e-8
to the denominator, consistent with the other BPR-based models fixed in
#677 and #686.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent 86da29c commit 9e16f46
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
422 | | - | |
| 422 | + | |
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
| |||
0 commit comments