From: Andrew Lewis Date: Mon, 10 Oct 2016 07:52:08 +0000 (+0200) Subject: [Fix] Fix bayes learn_condition X-Git-Tag: 1.4.0~280^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=89633ab46c08c1a05b7a8c6f2f0974b33bcb3f56;p=rspamd.git [Fix] Fix bayes learn_condition --- diff --git a/conf/statistic.conf b/conf/statistic.conf index 17aa29d4b..26e73c4d2 100644 --- a/conf/statistic.conf +++ b/conf/statistic.conf @@ -56,10 +56,7 @@ return function(task, is_spam, is_unlearn) in_class = prob <= 0.05 end - if is_unlearn and (not in_class) then - return false,string.format('not in class %s; probability %.2f%%', - cl, math.abs((prob - 0.5) * 200.0)) - elseif (not is_unlearn) and in_class then + if in_class then return false,string.format('already in class %s; probability %.2f%%', cl, math.abs((prob - 0.5) * 200.0)) end