aboutsummaryrefslogtreecommitdiffstats
path: root/src/classifiers/classifiers.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-12-03 21:28:50 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-12-03 21:28:50 +0300
commit2f551bd813a96567bac80aeaa186b706571b69f7 (patch)
treeae3705b93cbfe24376221b060b22d60ab6cac622 /src/classifiers/classifiers.h
parent56379fcf26379a1588e3ca9ad4bdb1c7f370d2c7 (diff)
downloadrspamd-2f551bd813a96567bac80aeaa186b706571b69f7.tar.gz
rspamd-2f551bd813a96567bac80aeaa186b706571b69f7.zip
* Many major fixes to statfiles:
- fix bug with mmapping files: new addresses must NOT be allocated in shared memory by themselves - fix bug with winnow classifier that totally brokes it down - fix bug with too much grow of values * Use double precission values in statistics * Add statistics for statfiles * Add more informative data to output of LEARN command (weight of incoming message) * Add weight to output of classifier as well
Diffstat (limited to 'src/classifiers/classifiers.h')
-rw-r--r--src/classifiers/classifiers.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/classifiers/classifiers.h b/src/classifiers/classifiers.h
index cab6eff21..12787f049 100644
--- a/src/classifiers/classifiers.h
+++ b/src/classifiers/classifiers.h
@@ -20,7 +20,7 @@ struct classifier {
struct classifier_ctx* (*init_func)(memory_pool_t *pool, struct classifier_config *cf);
void (*classify_func)(struct classifier_ctx* ctx, statfile_pool_t *pool, GTree *input, struct worker_task *task);
void (*learn_func)(struct classifier_ctx* ctx, statfile_pool_t *pool,
- stat_file_t *file, GTree *input, gboolean in_class);
+ stat_file_t *file, GTree *input, gboolean in_class, double *sum);
};
/* Get classifier structure by name or return NULL if this name is not found */
@@ -29,7 +29,7 @@ struct classifier* get_classifier (char *name);
/* Winnow algorithm */
struct classifier_ctx* winnow_init (memory_pool_t *pool, struct classifier_config *cf);
void winnow_classify (struct classifier_ctx* ctx, statfile_pool_t *pool, GTree *input, struct worker_task *task);
-void winnow_learn (struct classifier_ctx* ctx, statfile_pool_t *pool, stat_file_t *file, GTree *input, gboolean in_class);
+void winnow_learn (struct classifier_ctx* ctx, statfile_pool_t *pool, stat_file_t *file, GTree *input, gboolean in_class, double *sum);
/* Array of all defined classifiers */
extern struct classifier classifiers[];