aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorPragadeesh Chandiran <pchandiran@mimecast.com>2021-11-22 18:19:12 -0500
committerPragadeesh Chandiran <pchandiran@mimecast.com>2021-11-22 18:42:24 -0500
commitc279d99e0a648cd0514f2d881c33dd1915eac3e1 (patch)
treea754fde285c0bf8ca2a1468f290edde6b70d71c1 /lualib
parent07f08b196505009f1a5eaeed04642f64e57d2674 (diff)
downloadrspamd-c279d99e0a648cd0514f2d881c33dd1915eac3e1.tar.gz
rspamd-c279d99e0a648cd0514f2d881c33dd1915eac3e1.zip
[Test] Fix neural plugin tests
Diffstat (limited to 'lualib')
-rw-r--r--lualib/plugins/neural.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/lualib/plugins/neural.lua b/lualib/plugins/neural.lua
index f677119fe..3ce91b5e2 100644
--- a/lualib/plugins/neural.lua
+++ b/lualib/plugins/neural.lua
@@ -620,7 +620,7 @@ local function spawn_train(params)
params.rule.prefix, params.set.name)
end
- local roc_thresholds
+ local roc_thresholds = {}
if params.rule.roc_enabled then
local spam_threshold = get_roc_thresholds(train_ann,
inputs,
@@ -633,10 +633,10 @@ local function spawn_train(params)
params.rule.roc_misclassification_cost,
1 - params.rule.roc_misclassification_cost)
roc_thresholds = {spam_threshold, ham_threshold}
- end
- rspamd_logger.messagex("ROC thresholds: (spam_threshold: %s, ham_threshold: %s)",
- roc_thresholds[1], roc_thresholds[2])
+ rspamd_logger.messagex("ROC thresholds: (spam_threshold: %s, ham_threshold: %s)",
+ roc_thresholds[1], roc_thresholds[2])
+ end
if not seen_nan then
-- Convert to strings as ucl cannot rspamd_text properly