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" 112 bool setNumDimensions(
const UINT numDimensions);
122 bool setDatasetName(
const std::string datasetName);
131 bool setInfoText(
const std::string infoText);
142 bool setClassNameForCorrespondingClassLabel(
const std::string className,
const UINT classLabel);
153 bool setAllowNullGestureClass(
const bool allowNullGestureClass);
164 bool addSample(
const UINT classLabel,
const MatrixFloat &trainingSample);
171 bool removeLastSample();
179 UINT eraseAllSamplesWithClassLabel(
const UINT classLabel);
188 bool relabelAllSamplesWithClassLabel(
const UINT oldClassLabel,
const UINT newClassLabel);
198 bool setExternalRanges(
const Vector< MinMax > &externalRanges,
const bool useExternalRanges =
false);
207 bool enableExternalRangeScaling(
const bool useExternalRanges);
216 bool scale(
const Float minTarget,
const Float maxTarget);
226 bool scale(
const Vector<MinMax> &ranges,
const Float minTarget,
const Float maxTarget);
236 bool save(
const std::string &filename)
const;
246 bool load(
const std::string &filename);
254 bool saveDatasetToFile(
const std::string filename)
const;
262 bool loadDatasetFromFile(
const std::string filename);
271 bool saveDatasetToCSVFile(
const std::string &filename)
const;
282 bool loadDatasetFromCSVFile(
const std::string &filename);
290 bool printStats()
const;
298 std::string getStatsAsString()
const;
306 GRT_DEPRECATED_MSG(
"partition(...) is deprecated, use split(...) instead",
TimeSeriesClassificationData partition(
const UINT partitionPercentage,
const bool useStratifiedSampling =
false) );
335 bool spiltDataIntoKFolds(
const UINT K,
const bool useStratifiedSampling =
false);
411 UINT getMinimumClassLabel()
const;
418 UINT getMaximumClassLabel()
const;
425 UINT getClassLabelIndexValue(
const UINT classLabel)
const;
432 std::string getClassNameForCorrespondingClassLabel(
const UINT classLabel)
const;
486 #endif //GRT_LABELLED_TIME_SERIES_CLASSIFICATION_DATA_HEADER std::string getDatasetName() const
UINT numDimensions
The number of dimensions in the dataset.
Vector< MinMax > externalRanges
A vector containing a set of externalRanges set by the user.
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 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
WarningLog warningLog
Default warning log.
This class stores the timeseries data for a single labelled timeseries classification sample...
bool allowNullGestureClass
A flag that enables/disables a user from adding new samples with a class label matching the default n...
DebugLog debugLog
Default debugging log.
bool crossValidationSetup
A flag to show if the dataset is ready for cross validation.
std::string datasetName
The name of the dataset.
UINT getNumDimensions() const
ErrorLog errorLog
Default error log.
Vector< ClassTracker > classTracker
A vector of ClassTracker, which keeps track of the number of samples of each class.
std::string infoText
Some infoText about the dataset.
UINT getNumClasses() const
UINT getNumSamples() const
Vector< TimeSeriesClassificationSample > getClassificationData() const
Vector< Vector< UINT > > crossValidationIndexs
A vector to hold the indexs of the dataset for the cross validation.
std::string getInfoText() const