2013-11-13 22:50:38 +04:00
|
|
|
#ifndef DATA_H
|
|
|
|
#define DATA_H
|
|
|
|
|
2013-12-07 01:26:09 +04:00
|
|
|
#include "matrix.h"
|
2014-02-15 04:09:07 +04:00
|
|
|
#include "list.h"
|
2013-11-13 22:50:38 +04:00
|
|
|
|
|
|
|
typedef struct{
|
2013-12-07 01:26:09 +04:00
|
|
|
matrix X;
|
|
|
|
matrix y;
|
|
|
|
int shallow;
|
|
|
|
} data;
|
2013-11-13 22:50:38 +04:00
|
|
|
|
|
|
|
|
2013-12-07 01:26:09 +04:00
|
|
|
void free_data(data d);
|
2014-02-14 22:26:31 +04:00
|
|
|
data load_data_image_pathfile(char *filename, char **labels, int k, int h, int w);
|
2013-12-07 01:26:09 +04:00
|
|
|
data load_data_image_pathfile_part(char *filename, int part, int total,
|
2014-02-14 22:26:31 +04:00
|
|
|
char **labels, int k, int h, int w);
|
|
|
|
data load_data_image_pathfile_random(char *filename, int n, char **labels,
|
|
|
|
int k, int h, int w);
|
2014-03-13 08:57:34 +04:00
|
|
|
data load_cifar10_data(char *filename);
|
2014-02-15 04:09:07 +04:00
|
|
|
list *get_paths(char *filename);
|
2013-12-07 01:26:09 +04:00
|
|
|
data load_categorical_data_csv(char *filename, int target, int k);
|
|
|
|
void normalize_data_rows(data d);
|
2014-02-14 22:26:31 +04:00
|
|
|
void scale_data_rows(data d, float s);
|
2013-12-07 01:26:09 +04:00
|
|
|
void randomize_data(data d);
|
2013-12-07 21:38:50 +04:00
|
|
|
data *split_data(data d, int part, int total);
|
2013-11-13 22:50:38 +04:00
|
|
|
|
|
|
|
#endif
|