]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Fix ROC threshold calculation for ham/spam labels
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 20 Jan 2026 16:12:41 +0000 (16:12 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 20 Jan 2026 16:12:41 +0000 (16:12 +0000)
commit0457fba92bd2997774c040aeec61b56e06859414
treed6e78995974f06c507012c4a565d27d8782df153
parent6fb82f28aaaa6baca70b823c4c8497efb2b5eeb1
[Fix] Fix ROC threshold calculation for ham/spam labels

The ROC calculation was checking outputs[i][1] == 0 for ham samples,
but the ceb_neg cost function uses -1.0 for ham and 1.0 for spam.
Changed to check outputs[i][1] < 0 to correctly identify ham samples.
lualib/plugins/neural.lua