|
| Data () |
|
| Data (unsigned rows, unsigned cols) |
| Constructor. More...
|
|
| Data (unsigned rows, unsigned cols, const double st[]) |
| Constructor. More...
|
|
| Data (unsigned rows, unsigned cols, const Row &row) |
| Constructor. More...
|
|
virtual | ~Data () |
|
Row & | add () |
| Adds a row to the data, returning a reference to it. More...
|
|
Bounds & | calc_bounds () |
| Calculates and sets the data bounds using the minimum and maximum values of each neuron. More...
|
|
void | descale () |
| Descales the data. More...
|
|
Data | drop_column (unsigned col) const |
| Returns a copy of the current object, without a column. More...
|
|
double | get (unsigned row, unsigned col) const |
| Returns the value in the (row,col) cell. More...
|
|
void | k_fold (unsigned n, unsigned k, Data &p, Data &l) const |
| Fills two Data objects with complementary information, useful for cross-validation. More...
|
|
unsigned | load_file (const std::string &path) |
| Reads values from a file and appends then into the data. More...
|
|
Data | sample (unsigned first, unsigned last) const |
| Samples the data. More...
|
|
void | save_file (const std::string &path) const |
| Erases the contents of a file and saves the Data values into it. More...
|
|
void | save_info_file (const std::string &path) const |
| Erases the contents of a file and saves the Data bounds info into it. More...
|
|
void | scale () |
| Scales the data, neuron per neuron, using the current from and to bounds. More...
|
|
void | scale (double min, double max) |
| Scales the data, neuron per neuron, using the current "from" bounds. More...
|
|
void | scale_column (unsigned n, const SInfo &curv, const SInfo &newv) |
| Scales a single data column. More...
|
|
void | set (unsigned row, unsigned col, double val) |
| Sets the value in the (row,col) cell to value. More...
|
|
void | shuffle () |
| Randomizes the positions of the rows. More...
|
|
Data used in training, validation and testing.
Definition at line 95 of file data.hpp.
void SuperNN::Data::k_fold |
( |
unsigned |
n, |
|
|
unsigned |
k, |
|
|
Data & |
p, |
|
|
Data & |
l |
|
) |
| const |
Fills two Data objects with complementary information, useful for cross-validation.
The first Data object is filled with the N-th partition (0 based) of the original data, while the another one is filled with the remaining rows. Each one of the K partitions have roughly the same size, and the original data is left unmodified.
- Parameters
-
n | Partition to get |
k | Total number of partitions |
p | Data that will be filled with the rows from the selected partition |
l | Data that will be filled with the remaining rows |
Definition at line 348 of file data.cpp.