ze-filter  (ze-filter-0.8.0-develop-180218)
Filter : Neural Linear Discriminator

Classes

struct  lr_opts_T
 
struct  lr_cargs_T
 
struct  lr_margs_T
 

Macros

#define LR_CLASS_UNKNOWN   -1
 
#define LR_CLASS_HAM   0
 
#define LR_CLASS_SPAM   1
 
#define LR_CMD_CLASS   0
 
#define LR_CMD_LEARN   1
 
#define LR_CMD_LEARN_RESAMPLE   2
 
#define LR_CMD_LEARN_FEEDBACK   3
 
#define LR_CMD_EXTRACT   4
 
#define LR_TASK_CLASSIFY   1
 
#define LR_TASK_LEARN   2
 
#define LR_TASK_EXTRACT   4
 
#define LR_OPTS_INITIALIZER
 

Typedefs

typedef double(* lr_callback_F) (int, lr_cargs_T *, lr_margs_T *)
 

Functions

bool lr_data_open (char *fname)
 
bool lr_data_reopen ()
 
bool lr_data_close ()
 
bool lr_data_dump (char *fname)
 
bool lr_classify (char *id, char *fname, lr_cargs_T *cargs, lr_margs_T *margs, test_score_T *score)
 
bool lr_learn (char *id, char *fname, lr_cargs_T *cargs, lr_margs_T *margs, test_score_T *score, bool spam)
 
bool lr_extract (char *id, char *fname, lr_cargs_T *cargs, lr_margs_T *margs)
 
bool lr_learn_options (bool active, double threshold)
 
bool lr_set_options (lr_opts_T *opts)
 
bool lr_get_options (lr_opts_T *opts)
 
void lr_print_options (lr_opts_T *opts)
 
bool lr_set_learn_callback (lr_callback_F)
 
bool lr_data_load (bool background)
 

Variables

bool lr_filter_ok
 

Detailed Description

Macro Definition Documentation

◆ LR_CLASS_HAM

#define LR_CLASS_HAM   0

Definition at line 33 of file ze-lr-funcs.h.

◆ LR_CLASS_SPAM

#define LR_CLASS_SPAM   1

Definition at line 34 of file ze-lr-funcs.h.

◆ LR_CLASS_UNKNOWN

#define LR_CLASS_UNKNOWN   -1

Definition at line 32 of file ze-lr-funcs.h.

◆ LR_CMD_CLASS

#define LR_CMD_CLASS   0

Definition at line 36 of file ze-lr-funcs.h.

◆ LR_CMD_EXTRACT

#define LR_CMD_EXTRACT   4

Definition at line 40 of file ze-lr-funcs.h.

◆ LR_CMD_LEARN

#define LR_CMD_LEARN   1

Definition at line 37 of file ze-lr-funcs.h.

◆ LR_CMD_LEARN_FEEDBACK

#define LR_CMD_LEARN_FEEDBACK   3

Definition at line 39 of file ze-lr-funcs.h.

◆ LR_CMD_LEARN_RESAMPLE

#define LR_CMD_LEARN_RESAMPLE   2

Definition at line 38 of file ze-lr-funcs.h.

◆ LR_OPTS_INITIALIZER

#define LR_OPTS_INITIALIZER
Value:
{ \
0.004, FALSE, \
FALSE, 2500, 256, TRUE, TRUE, TRUE, TRUE, \
0, 4, \
FALSE, 0.25 \
}
#define FALSE
Definition: macros.h:160
#define TRUE
Definition: macros.h:157

Definition at line 74 of file ze-lr-funcs.h.

◆ LR_TASK_CLASSIFY

#define LR_TASK_CLASSIFY   1

Definition at line 43 of file ze-lr-funcs.h.

◆ LR_TASK_EXTRACT

#define LR_TASK_EXTRACT   4

Definition at line 45 of file ze-lr-funcs.h.

◆ LR_TASK_LEARN

#define LR_TASK_LEARN   2

Definition at line 44 of file ze-lr-funcs.h.

Typedef Documentation

◆ lr_callback_F

typedef double(* lr_callback_F) (int, lr_cargs_T *, lr_margs_T *)

Definition at line 155 of file ze-lr-funcs.h.

Function Documentation

◆ lr_classify()

bool lr_classify ( char *  id,
char *  fname,
lr_cargs_T cargs,
lr_margs_T margs,
test_score_T score 
)

Definition at line 965 of file ze-lr-funcs.c.

◆ lr_data_close()

bool lr_data_close ( )

Definition at line 350 of file ze-lr-funcs.c.

◆ lr_data_dump()

bool lr_data_dump ( char *  fname)

Definition at line 435 of file ze-lr-funcs.c.

◆ lr_data_load()

bool lr_data_load ( bool  background)

Definition at line 48 of file ze-lr-init.c.

◆ lr_data_open()

bool lr_data_open ( char *  fname)

Definition at line 247 of file ze-lr-funcs.c.

◆ lr_data_reopen()

bool lr_data_reopen ( )

◆ lr_extract()

bool lr_extract ( char *  id,
char *  fname,
lr_cargs_T cargs,
lr_margs_T margs 
)

Definition at line 951 of file ze-lr-funcs.c.

◆ lr_get_options()

bool lr_get_options ( lr_opts_T opts)

Definition at line 1027 of file ze-lr-funcs.c.

◆ lr_learn()

bool lr_learn ( char *  id,
char *  fname,
lr_cargs_T cargs,
lr_margs_T margs,
test_score_T score,
bool  spam 
)

Definition at line 980 of file ze-lr-funcs.c.

◆ lr_learn_options()

bool lr_learn_options ( bool  active,
double  threshold 
)

Definition at line 997 of file ze-lr-funcs.c.

◆ lr_print_options()

void lr_print_options ( lr_opts_T opts)

Definition at line 1042 of file ze-lr-funcs.c.

◆ lr_set_learn_callback()

bool lr_set_learn_callback ( lr_callback_F  )

Definition at line 1074 of file ze-lr-funcs.c.

◆ lr_set_options()

bool lr_set_options ( lr_opts_T opts)

Definition at line 1012 of file ze-lr-funcs.c.

Variable Documentation

◆ lr_filter_ok

bool lr_filter_ok

Definition at line 38 of file ze-lr-init.c.