32 #ifndef GRT_REGRESSION_DATA_HEADER
33 #define GRT_REGRESSION_DATA_HEADER
35 #include "../Util/GRTCommon.h"
52 RegressionData(
const UINT numInputDimensions=0,
const UINT numTargetDimensions=0,
const string datasetName=
"NOT_SET",
const string infoText=
"");
141 bool addSample(
const VectorDouble &inputVector,
const VectorDouble &targetVector);
169 bool setExternalRanges(
const vector< MinMax > &externalInputRanges,
const vector< MinMax > &externalTargetRanges,
const bool useExternalRanges);
187 bool scale(
const double minTarget,
const double maxTarget);
194 bool scale(
const vector< MinMax > &inputVectorRanges,
const vector< MinMax > &targetVectorRanges,
const double minTarget,
const double maxTarget);
204 bool save(
const string &filename)
const;
214 bool load(
const string &filename);
251 bool loadDatasetFromCSVFile(
const string &filename,
const UINT numInputDimensions,
const UINT numTargetDimensions);
253 bool printStats()
const;
299 UINT removeDuplicateSamples();
315 string getStatsAsString()
const;
357 vector< RegressionSample >
getData()
const{
return data; }
362 UINT numInputDimensions;
363 UINT numTargetDimensions;
364 UINT totalNumSamples;
366 bool crossValidationSetup;
367 bool useExternalRanges;
368 vector< MinMax > externalInputRanges;
369 vector< MinMax > externalTargetRanges;
370 vector< RegressionSample > data;
371 vector< vector< UINT > > crossValidationIndexs;
380 #endif //GRT_REGRESSION_DATA_HEADER
bool saveDatasetToCSVFile(const string &filename) const
RegressionSample & operator[](const UINT &i)
bool loadDatasetFromCSVFile(const string &filename, const UINT numInputDimensions, const UINT numTargetDimensions)
string getDatasetName() const
string getInfoText() const
bool enableExternalRangeScaling(const bool useExternalRanges)
bool setInfoText(const string &infoText)
bool loadDatasetFromFile(const string &filename)
bool setInputAndTargetDimensions(const UINT numInputDimensions, const UINT numTargetDimensions)
bool load(const string &filename)
vector< MinMax > getInputRanges() const
bool reserve(const UINT N)
UINT getNumSamples() const
const RegressionSample & operator[](const UINT &i) const
bool setExternalRanges(const vector< MinMax > &externalInputRanges, const vector< MinMax > &externalTargetRanges, const bool useExternalRanges)
bool saveDatasetToFile(const string &filename) const
RegressionData getTrainingFoldData(const UINT foldIndex) const
This class stores the input vector and target vector for a single labelled regression instance...
vector< MinMax > getTargetRanges() const
RegressionData & operator=(const RegressionData &rhs)
bool merge(const RegressionData ®ressionData)
vector< RegressionSample > getData() const
bool spiltDataIntoKFolds(const UINT K)
bool save(const string &filename) const
RegressionData(const UINT numInputDimensions=0, const UINT numTargetDimensions=0, const string datasetName="NOT_SET", const string infoText="")
RegressionData partition(const UINT trainingSizePercentage)
UINT getNumTargetDimensions() const
bool addSample(const VectorDouble &inputVector, const VectorDouble &targetVector)
bool setDatasetName(const string &datasetName)
UINT getNumInputDimensions() const
RegressionData getTestFoldData(const UINT foldIndex) const
bool scale(const double minTarget, const double maxTarget)