35#include "../include/STK_DataHandler.h"
42 , std::string
const& idData
51 stk_cerr <<
_T(
"An error occur when reading the data file.\nWhat: ")
62 for (
int j=
data.beginCols();
j<
data.endCols(); ++
j)
76 stk_cerr <<
_T(
"An error occur when reading the data file.\nWhat: ")
82 rwdesc.setWithNames(
false);
86 stk_cerr <<
_T(
"An error occur when reading the descriptor file.\nWhat: ")
93 stk_cerr <<
_T(
"Data file and descriptor file does not have the same number of column.\n");
96 if (
rwdata.sizeRows() == 0)
101 if (
rwdesc.sizeRows() < 2)
107 int firstRow =
rwdesc.beginRows();
111 std::string idData =
rwdesc.at(
j).at(firstRow+1);
#define stk_cerr
Standard stk error stream.
#define _T(x)
Let x unmodified.
InfoMap info_
Store the informations of the mixtures in the form (idData, idModel) with.
bool addInfo(std::string const &idData, std::string const &idModel)
Add an info descriptor to the data handler.
ReadWriteCsv descriptor_
descriptor files with two rows.
bool withNames_
first line with names ?
ReadWriteCsv data_
data files
void removeData(std::string const &idData)
remove the data with the given idData
std::vector< int > colIndex(std::string const &idData) const
lookup on the descriptors in order to get the columns of the ReadWriteCsv with the Id idData.
bool readDataFromCsvFile(std::string const &datafile, std::string descriptorfile)
read a data file and its companion description file.
ReadWriteCsv const & data() const
get the whole data set
String const & error() const
get the last error message.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
String stringNa
Representation of a Not Available value.
const int baseIdx
base index of the containers created in STK++.
The namespace STK is the main domain space of the Statistical ToolKit project.