From 0c4ff1eeb84199e3443f5a534efdb85402c53459 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Tue, 6 Aug 2013 18:16:40 +0200 Subject: Added prediction script and model i/o. --- include/util.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/util.h') diff --git a/include/util.h b/include/util.h index 0b5009e..ec415ac 100644 --- a/include/util.h +++ b/include/util.h @@ -3,6 +3,7 @@ #include #include #include +#include #include "MSVMMaj.h" #define Calloc(type, n) (type *)calloc((n), sizeof(type)) @@ -11,7 +12,12 @@ #define maximum(a, b) a > b ? a : b #define minimum(a, b) a < b ? a : b -void read_data(struct Data *dataset, struct Model *model, char *data_file); +void read_data(struct Data *dataset, char *data_file); + +void read_model(struct Model *model, char *model_filename); +void write_model(struct Model *model, char *output_filename); + +void write_predictions(struct Data *data, long *predy, char *output_filename); int check_argv(int argc, char **argv, char *str); int check_argv_eq(int argc, char **argv, char *str); @@ -34,3 +40,4 @@ void free_model(struct Model *model); void free_data(struct Data *data); void print_matrix(double *M, long rows, long cols); + -- cgit v1.2.3