aboutsummaryrefslogtreecommitdiff
path: root/src/parse.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse.h')
-rw-r--r--src/parse.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/parse.h b/src/parse.h
index 07f740b..3f49c15 100644
--- a/src/parse.h
+++ b/src/parse.h
@@ -6,13 +6,38 @@
#include "util.h"
+enum ArrayType {
+ ARRAY_NUMERICAL,
+ ARRAY_ORDINAL,
+ ARRAY_ONEHOT
+};
+
+union ArrayValue {
+ double numeric;
+ char *categorical;
+};
+
typedef struct Array {
- double *data;
+ enum ArrayType *type;
+ union ArrayValue *data;
size_t shape[2];
} Array;
+void array_free(Array *x);
void file_read(char *filepath, Array *input, Array *out, struct Configs configs, bool read_output);
void file_write(Array input, Array out, struct Configs ml_configs);
char * file_format_infer(char *filename);
+double * data_preprocess(
+ size_t out_shape[2],
+ Array data,
+ struct Configs configs,
+ bool is_input,
+ bool only_allocate);
+
+void data_postprocess(
+ Array *out,
+ double *data, size_t data_shape[2],
+ struct Configs cfgs,
+ bool is_input);
#endif
Feel free to download, copy and edit any repo