diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-08-28 17:40:13 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-08-28 17:40:13 +0100 |
commit | b562090c505b1cd9dd5d71734b6744b34c02f05c (patch) | |
tree | 093901163aae82e396b518f8b59c9a293a57c0df /test | |
parent | f3d8644e634acd8aee912a7871b30d7836709243 (diff) | |
download | rspamd-b562090c505b1cd9dd5d71734b6744b34c02f05c.tar.gz rspamd-b562090c505b1cd9dd5d71734b6744b34c02f05c.zip |
[Test] Add neural PCA tests
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/cases/330_neural.robot | 24 | ||||
-rw-r--r-- | test/functional/configs/neural.conf | 18 |
2 files changed, 32 insertions, 10 deletions
diff --git a/test/functional/cases/330_neural.robot b/test/functional/cases/330_neural.robot index a9a338f95..e7f8418ff 100644 --- a/test/functional/cases/330_neural.robot +++ b/test/functional/cases/330_neural.robot @@ -26,13 +26,17 @@ Train Check Neural HAM Sleep 2s Wait for neural to be loaded ${result} = Scan Message With Rspamc ${MESSAGE} --header Settings={symbols_enabled = ["HAM_SYMBOL"];groups_enabled=["neural"];symbols_disabled = ["NEURAL_LEARN"]} - Check Rspamc ${result} NEURAL_HAM_SHORT - Check Rspamc ${result} NEURAL_SPAM_SHORT inverse=1 + Check Rspamc ${result} NEURAL_HAM_SHORT ( + Check Rspamc ${result} NEURAL_SPAM_SHORT ( inverse=1 + Check Rspamc ${result} NEURAL_HAM_SHORT_PCA ( + Check Rspamc ${result} NEURAL_SPAM_SHORT_PCA ( inverse=1 Check Neural SPAM ${result} = Scan Message With Rspamc ${MESSAGE} --header Settings={symbols_enabled = ["SPAM_SYMBOL"];groups_enabled=["neural"];symbols_disabled = ["NEURAL_LEARN"]} - Check Rspamc ${result} NEURAL_SPAM_SHORT - Check Rspamc ${result} NEURAL_HAM_SHORT inverse=1 + Check Rspamc ${result} NEURAL_SPAM_SHORT ( + Check Rspamc ${result} NEURAL_HAM_SHORT ( inverse=1 + Check Rspamc ${result} NEURAL_SPAM_SHORT_PCA ( + Check Rspamc ${result} NEURAL_HAM_SHORT_PCA ( inverse=1 Train INVERSE @@ -46,13 +50,17 @@ Train INVERSE Check Neural HAM INVERSE Sleep 2s Wait for neural to be loaded ${result} = Scan Message With Rspamc ${MESSAGE} --header Settings={symbols_enabled = ["HAM_SYMBOL"];groups_enabled=["neural"]} - Check Rspamc ${result} NEURAL_SPAM_SHORT - Check Rspamc ${result} NEURAL_HAM_SHORT inverse=1 + Check Rspamc ${result} NEURAL_SPAM_SHORT ( + Check Rspamc ${result} NEURAL_SPAM_SHORT_PCA ( + Check Rspamc ${result} NEURAL_HAM_SHORT ( inverse=1 + Check Rspamc ${result} NEURAL_HAM_SHORT_PCA ( inverse=1 Check Neural SPAM INVERSE ${result} = Scan Message With Rspamc ${MESSAGE} --header Settings={symbols_enabled = ["SPAM_SYMBOL"];groups_enabled=["neural"]} - Check Rspamc ${result} NEURAL_HAM_SHORT - Check Rspamc ${result} NEURAL_SPAM_SHORT inverse=1 + Check Rspamc ${result} NEURAL_HAM_SHORT ( + Check Rspamc ${result} NEURAL_HAM_SHORT_PCA ( + Check Rspamc ${result} NEURAL_SPAM_SHORT ( inverse=1 + Check Rspamc ${result} NEURAL_SPAM_SHORT_PCA ( inverse=1 *** Keywords *** Neural Setup diff --git a/test/functional/configs/neural.conf b/test/functional/configs/neural.conf index 0a2ded95e..871a549fe 100644 --- a/test/functional/configs/neural.conf +++ b/test/functional/configs/neural.conf @@ -54,9 +54,23 @@ neural { symbol_spam = "NEURAL_SPAM_SHORT"; symbol_ham = "NEURAL_HAM_SHORT"; ann_expire = 86400; - watch_interval = 0.1; + watch_interval = 0.5; + } + SHORT_PCA { + train { + learning_rate = 0.001; + max_usages = 2; + spam_score = 1; + ham_score = -1; + max_trains = 10; + max_iterations = 250; + } + symbol_spam = "NEURAL_SPAM_SHORT_PCA"; + symbol_ham = "NEURAL_HAM_SHORT_PCA"; + ann_expire = 86400; + watch_interval = 0.5; + max_inputs = 2; } - } allow_local = true; |