2013-11-13 22:50:38 +04:00
|
|
|
#ifndef MATRIX_H
|
|
|
|
#define MATRIX_H
|
|
|
|
typedef struct matrix{
|
|
|
|
int rows, cols;
|
2014-01-29 04:28:42 +04:00
|
|
|
float **vals;
|
2013-11-13 22:50:38 +04:00
|
|
|
} matrix;
|
|
|
|
|
|
|
|
matrix make_matrix(int rows, int cols);
|
|
|
|
void free_matrix(matrix m);
|
|
|
|
void print_matrix(matrix m);
|
|
|
|
|
|
|
|
matrix csv_to_matrix(char *filename);
|
|
|
|
matrix hold_out_matrix(matrix *m, int n);
|
2014-01-29 04:28:42 +04:00
|
|
|
float matrix_accuracy(matrix truth, matrix guess);
|
2013-12-07 21:38:50 +04:00
|
|
|
void matrix_add_matrix(matrix from, matrix to);
|
2013-11-13 22:50:38 +04:00
|
|
|
|
2014-01-29 04:28:42 +04:00
|
|
|
float *pop_column(matrix *m, int c);
|
2013-11-13 22:50:38 +04:00
|
|
|
|
|
|
|
#endif
|