31 #ifndef GRT_TIME_SERIES_CLASSIFICATION_DATA_HEADER
32 #define GRT_TIME_SERIES_CLASSIFICATION_DATA_HEADER
34 #include "VectorFloat.h"
35 #include "MatrixFloat.h"
36 #include "../Util/GRTCommon.h"
216 bool scale(
const Float minTarget,
const Float maxTarget);
236 bool save(
const std::string &filename)
const;
246 bool load(
const std::string &filename);
478 #endif //GRT_LABELLED_TIME_SERIES_CLASSIFICATION_DATA_HEADER
std::string getStatsAsString() const
bool spiltDataIntoKFolds(const UINT K, const bool useStratifiedSampling=false)
bool loadDatasetFromCSVFile(const std::string &filename)
std::string getDatasetName() const
virtual ~TimeSeriesClassificationData()
UINT numDimensions
The number of dimensions in the dataset.
TimeSeriesClassificationSample & operator[](const UINT &i)
bool setInfoText(const std::string infoText)
Vector< MinMax > externalRanges
A vector containing a set of externalRanges set by the user.
bool merge(const TimeSeriesClassificationData &labelledData)
Vector< TimeSeriesClassificationSample > data
The labelled time series classification data.
UINT kFoldValue
The number of folds the dataset has been spilt into for cross valiation.
bool setNumDimensions(const UINT numDimensions)
TimeSeriesClassificationData & operator=(const TimeSeriesClassificationData &rhs)
bool saveDatasetToFile(const std::string filename) const
unsigned int getSize() const
Vector< MinMax > getRanges() const
bool useExternalRanges
A flag to show if the dataset should be scaled using the externalRanges values.
The UnlabelledData class is the main data container for supporting unsupervised learning.
UINT totalNumSamples
The total number of samples in the dataset.
Vector< ClassTracker > getClassTracker() const
bool setExternalRanges(const Vector< MinMax > &externalRanges, const bool useExternalRanges=false)
MatrixFloat getDataAsMatrixFloat() const
WarningLog warningLog
Default warning log.
This class stores the timeseries data for a single labelled timeseries classification sample...
bool relabelAllSamplesWithClassLabel(const UINT oldClassLabel, const UINT newClassLabel)
UINT eraseAllSamplesWithClassLabel(const UINT classLabel)
bool allowNullGestureClass
A flag that enables/disables a user from adding new samples with a class label matching the default n...
bool enableExternalRangeScaling(const bool useExternalRanges)
std::string getClassNameForCorrespondingClassLabel(const UINT classLabel) const
DebugLog debugLog
Default debugging log.
UINT getClassLabelIndexValue(const UINT classLabel) const
bool crossValidationSetup
A flag to show if the dataset is ready for cross validation.
bool addSample(const UINT classLabel, const MatrixFloat &trainingSample)
UINT getMaximumClassLabel() const
std::string datasetName
The name of the dataset.
bool scale(const Float minTarget, const Float maxTarget)
TimeSeriesClassificationData getClassData(const UINT classLabel) const
bool setClassNameForCorrespondingClassLabel(const std::string className, const UINT classLabel)
UINT getNumDimensions() const
bool saveDatasetToCSVFile(const std::string &filename) const
ErrorLog errorLog
Default error log.
Vector< ClassTracker > classTracker
A vector of ClassTracker, which keeps track of the number of samples of each class.
UnlabelledData reformatAsUnlabelledData() const
TimeSeriesClassificationData(UINT numDimensions=0, std::string datasetName="NOT_SET", std::string infoText="")
UINT getMinimumClassLabel() const
std::string infoText
Some infoText about the dataset.
UINT getNumClasses() const
bool setDatasetName(const std::string datasetName)
TimeSeriesClassificationData partition(const UINT partitionPercentage, const bool useStratifiedSampling=false)
UINT getNumSamples() const
Vector< TimeSeriesClassificationSample > getClassificationData() const
Vector< Vector< UINT > > crossValidationIndexs
A vector to hold the indexs of the dataset for the cross validation.
bool setAllowNullGestureClass(const bool allowNullGestureClass)
TimeSeriesClassificationData getTrainingFoldData(const UINT foldIndex) const
bool load(const std::string &filename)
bool save(const std::string &filename) const
std::string getInfoText() const
bool loadDatasetFromFile(const std::string filename)
TimeSeriesClassificationData getTestFoldData(const UINT foldIndex) const