]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix bayes learn_condition 1018/head
authorAndrew Lewis <nerf@judo.za.org>
Mon, 10 Oct 2016 07:52:08 +0000 (09:52 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Mon, 10 Oct 2016 07:52:08 +0000 (09:52 +0200)
conf/statistic.conf

index 17aa29d4b1414708bc8a01786d388aa330bf55e9..26e73c4d23aba1e821e8bedf533bf8193852e0f9 100644 (file)
@@ -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