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