MachineIntelligenceCore:Algorithms
|
Class responsible for collection of data during experiments end exporting the results to files. More...
#include <DataCollector.hpp>
Public Member Functions | |
DataCollector () | |
virtual | ~DataCollector () |
void | createContainer (LABEL_TYPE label_, DATA_TYPE min_, DATA_TYPE max_, mic::types::color_rgba color_=mic::types::color_rgba(255, 255, 255, 180), float line_width_=1.0f) |
void | createContainer (LABEL_TYPE label_, mic::types::color_rgba color_=mic::types::color_rgba(255, 255, 255, 180), float line_width_=1.0f) |
void | addDataToContainer (LABEL_TYPE label_, DATA_TYPE value_) |
DataContainerPtr< DATA_TYPE > | getDataFromContainer (LABEL_TYPE label_) |
DataContainers< LABEL_TYPE, DATA_TYPE > | getContainers () |
void | exportDataToCsv (std::string filename_="data.csv") |
Static Public Member Functions | |
static void | exportVectorToCsv (std::string filename_, std::string label_, std::vector< DATA_TYPE > data_, bool append_=false) |
static void | exportValueToCsv (std::string filename_, std::string label_, DATA_TYPE value_, bool append_=false) |
static void | exportCommentToCsv (std::string filename_, std::string exportCommentToCsv, bool append_=false) |
static void | exportMatrixToCsv (std::string filename_, std::string label_, std::shared_ptr< mic::types::Matrix< DATA_TYPE > > matrix_, bool append_=false) |
static void | exportMatricesToCsv (std::string filename_, std::string label_, std::vector< mic::types::MatrixPtr< DATA_TYPE > > data_, bool append_=false) |
Protected Attributes | |
DataContainers< LABEL_TYPE, DATA_TYPE > | containers |
Class responsible for collection of data during experiments end exporting the results to files.
LABEL_TYPE | Template parameter denoting the label type. |
DATA_TYPE | Template parameter denoting basic used datatype. |
Definition at line 114 of file DataCollector.hpp.
|
inline |
Constructor. Empty for now.
Definition at line 119 of file DataCollector.hpp.
|
inlinevirtual |
Destructor. Empty for now.
Definition at line 124 of file DataCollector.hpp.
|
inline |
Adds new value to the container.
label_ | Name of the container. |
value_ | Value to be added. |
Definition at line 174 of file DataCollector.hpp.
References mic::utils::DataCollector< LABEL_TYPE, DATA_TYPE >::containers.
|
inline |
Creates new data container for a given label. Sets min and max values.
label_ | Name of the container. |
min_ | Minimum value (used in visualization). |
min_ | Maximum value (used in visualization). |
color_ | Colour of line/label (used in visualization). |
line_width_ | Line width (used in visualization). |
Definition at line 134 of file DataCollector.hpp.
References mic::utils::DataCollector< LABEL_TYPE, DATA_TYPE >::containers.
|
inline |
Creates new data container for a given label. This container will automatically scale (find the min/max values when adding new ones)
label_ | Name of the container. |
color_ | Colour of line/label (used in visualization). |
line_width_ | Line width (used in visualization). |
Definition at line 154 of file DataCollector.hpp.
References mic::utils::DataCollector< LABEL_TYPE, DATA_TYPE >::containers.
|
inlinestatic |
Exports a comment to file.
filename_ | Output filename. |
comment_ | Comment to be added (in a separate line). |
append_ | Flag denoting whether data should be added to existing data in a file or file should be truncated. |
Definition at line 303 of file DataCollector.hpp.
|
inline |
Exports collected data to csv.
filename_ | Output filename (=data.csv). |
Definition at line 230 of file DataCollector.hpp.
References mic::utils::DataCollector< LABEL_TYPE, DATA_TYPE >::containers.
|
inlinestatic |
Exports vector of matrices to csv (in Row-major order).
filename_ | Output filename. |
label_ | Data label (written in file, above the line containing data) |
data_ | Data - a vector of Eigen::Matrix pointers. |
append_ | Flag denoting whether data should be added to existing data in a file or file should be truncated. |
Definition at line 354 of file DataCollector.hpp.
|
inlinestatic |
Exports Eigen (or derived) matrix to a csv file (in Row-major order).
filename_ | Output filename. |
label_ | Data label (written in file, above the line containing data) |
matrix_ | (A shared pointer to) Matrix to be exported. |
append_ | Flag denoting whether data should be added to existing data in a file or file should be truncated. |
Definition at line 324 of file DataCollector.hpp.
|
inlinestatic |
Exports a single value to file.
filename_ | Output filename. |
label_ | Data label (written in file, before the data) |
data_ | Data (a single value). |
append_ | Flag denoting whether data should be added to existing data in a file or file should be truncated. |
Definition at line 283 of file DataCollector.hpp.
Referenced by main().
|
inlinestatic |
Exports the vector to csv.
filename_ | Output filename. |
label_ | Data label (written in file, above the line containing data) |
data_ | Data (vector) |
append_ | Flag denoting whether data should be added to existing data in a file or file should be truncated. |
Definition at line 257 of file DataCollector.hpp.
Referenced by main().
|
inline |
Returns the containers.
Definition at line 220 of file DataCollector.hpp.
References mic::utils::DataCollector< LABEL_TYPE, DATA_TYPE >::containers.
|
inline |
Returns the data stored by container with a given label.
label_ | Name of the container. |
Definition at line 198 of file DataCollector.hpp.
References mic::utils::DataCollector< LABEL_TYPE, DATA_TYPE >::containers.
|
protected |
Registry storing the containers.
Definition at line 388 of file DataCollector.hpp.
Referenced by mic::utils::DataCollector< LABEL_TYPE, DATA_TYPE >::addDataToContainer(), mic::utils::DataCollector< LABEL_TYPE, DATA_TYPE >::createContainer(), mic::utils::DataCollector< LABEL_TYPE, DATA_TYPE >::exportDataToCsv(), mic::utils::DataCollector< LABEL_TYPE, DATA_TYPE >::getContainers(), and mic::utils::DataCollector< LABEL_TYPE, DATA_TYPE >::getDataFromContainer().