31 #ifndef GRT_CLASSIFICATION_DATA_HEADER
32 #define GRT_CLASSIFICATION_DATA_HEADER
34 #include "VectorFloat.h"
35 #include "../Util/GRTCommon.h"
36 #include "../CoreModules/GRTBase.h"
54 ClassificationData(UINT numDimensions = 0,std::string datasetName =
"NOT_SET",std::string infoText =
"");
194 bool addClass(
const UINT classLabel,
const std::string className =
"NOT_SET");
248 bool scale(
const Float minTarget,
const Float maxTarget);
265 bool save(
const std::string &filename)
const;
275 bool load(
const std::string &filename);
618 static bool generateGaussDataset(
const std::string filename,
const UINT numSamples = 10000,
const UINT numClasses = 10,
const UINT numDimensions = 3,
const Float range = 10,
const Float sigma = 1 );
622 std::string datasetName;
623 std::string infoText;
625 UINT totalNumSamples;
627 bool crossValidationSetup;
628 bool useExternalRanges;
629 bool allowNullGestureClass;
638 #endif //GRT_CLASSIFICATION_DATA_HEADER
bool saveDatasetToFile(const std::string &filename) const
bool setDatasetName(std::string datasetName)
bool loadDatasetFromFile(const std::string &filename)
RegressionData reformatAsRegressionData() const
ClassificationData & operator=(const ClassificationData &rhs)
static bool generateGaussDataset(const std::string filename, const UINT numSamples=10000, const UINT numClasses=10, const UINT numDimensions=3, const Float range=10, const Float sigma=1)
bool relabelAllSamplesWithClassLabel(const UINT oldClassLabel, const UINT newClassLabel)
bool addSample(UINT classLabel, const VectorFloat &sample)
ClassificationData getTestFoldData(const UINT foldIndex) const
bool addClass(const UINT classLabel, const std::string className="NOT_SET")
Vector< ClassTracker > getClassTracker() const
Vector< ClassificationSample > getClassificationData() const
ClassificationData getClassData(const UINT classLabel) const
bool setNumDimensions(UINT numDimensions)
UINT eraseAllSamplesWithClassLabel(const UINT classLabel)
MatrixDouble getDataAsMatrixDouble() const
MatrixFloat getClassMean() const
std::string getClassNameForCorrespondingClassLabel(const UINT classLabel) const
std::string getDatasetName() const
bool setClassNameForCorrespondingClassLabel(std::string className, UINT classLabel)
Vector< UINT > getClassLabels() const
bool loadDatasetFromCSVFile(const std::string &filename, const UINT classLabelColumnIndex=0)
bool setAllowNullGestureClass(bool allowNullGestureClass)
UINT getMinimumClassLabel() const
Vector< MatrixFloat > getHistogramData(const UINT numBins) const
unsigned int getSize() const
UINT removeClass(const UINT classLabel)
The UnlabelledData class is the main data container for supporting unsupervised learning.
ClassificationData(UINT numDimensions=0, std::string datasetName="NOT_SET", std::string infoText="")
bool setInfoText(std::string infoText)
Vector< UINT > getNumSamplesPerClass() const
MatrixFloat getCovarianceMatrix() const
UnlabelledData reformatAsUnlabelledData() const
bool removeSample(const UINT index)
UINT getNumSamples() const
bool spiltDataIntoKFolds(const UINT K, const bool useStratifiedSampling=false)
bool save(const std::string &filename) const
bool enableExternalRangeScaling(const bool useExternalRanges)
bool setExternalRanges(const Vector< MinMax > &externalRanges, const bool useExternalRanges=false)
bool reserve(const UINT N)
bool saveDatasetToCSVFile(const std::string &filename) const
ClassificationData partition(const UINT partitionPercentage, const bool useStratifiedSampling=false)
UINT getNumDimensions() const
UINT getNumClasses() const
The RegressionData is the main data structure for recording, labeling, managing, saving, and loading datasets that can be used to train and test the GRT supervised regression algorithms.
Vector< MinMax > getRanges() const
bool merge(const ClassificationData &data)
VectorFloat getStdDev() const
Vector< UINT > getClassDataIndexes(const UINT classLabel) const
std::string getInfoText() const
MatrixFloat getDataAsMatrixFloat() const
ClassificationSample & operator[](const UINT &i)
UINT getClassLabelIndexValue(const UINT classLabel) const
ClassificationData getBootstrappedDataset(UINT numSamples=0, bool balanceDataset=false) const
MatrixFloat getClassHistogramData(const UINT classLabel, const UINT numBins) const
ClassificationData getTrainingFoldData(const UINT foldIndex) const
UINT getMaximumClassLabel() const
bool scale(const Float minTarget, const Float maxTarget)
bool load(const std::string &filename)
This class stores the class label and raw data for a single labelled classification sample...
MatrixFloat getClassStdDev() const
std::string getStatsAsString() const
virtual ~ClassificationData()
VectorFloat getMean() const