| | |
| | | void smooth_data(data d) |
| | | { |
| | | int i, j; |
| | | int scale = 1. / d.y.cols; |
| | | int eps = .1; |
| | | float scale = 1. / d.y.cols; |
| | | float eps = .1; |
| | | for(i = 0; i < d.y.rows; ++i){ |
| | | for(j = 0; j < d.y.cols; ++j){ |
| | | d.y.vals[i][j] = eps * scale + (1-eps) * d.y.vals[i][j]; |
| | |
| | | data load_go(char *filename) |
| | | { |
| | | FILE *fp = fopen(filename, "rb"); |
| | | matrix X = make_matrix(128, 361); |
| | | matrix y = make_matrix(128, 361); |
| | | matrix X = make_matrix(3363059, 361); |
| | | matrix y = make_matrix(3363059, 361); |
| | | int row, col; |
| | | |
| | | if(!fp) file_error(filename); |
| | |
| | | X.vals[count][i] = val; |
| | | } |
| | | ++count; |
| | | free(label); |
| | | free(board); |
| | | } |
| | | X = resize_matrix(X, count); |
| | | y = resize_matrix(y, count); |