31 #ifndef GRT_TIME_SERIES_CLASSIFICATION_DATA_STREAM_HEADER
32 #define GRT_TIME_SERIES_CLASSIFICATION_DATA_STREAM_HEADER
34 #include "../Util/GRTCommon.h"
138 bool addSample(
const UINT classLabel,
const VectorDouble &trainingSample);
190 bool scale(
const double minTarget,
const double maxTarget);
200 bool scale(
const vector<MinMax> &ranges,
const double minTarget,
const double maxTarget);
234 bool save(
const string &filename);
244 bool load(
const string &filename);
444 UINT totalNumSamples;
450 vector< ClassTracker > classTracker;
451 vector< ClassificationSample > data;
452 vector< TimeSeriesPositionTracker > timeSeriesPositionTracker;
461 #endif //GRT_TIME_SERIES_CLASSIFICATION_DATA_STREAM_HEADER
WarningLog warningLog
Default warning log.
UINT getNumDimensions() const
ClassificationSample getNextSample()
DebugLog debugLog
Default debugging log.
UINT getNumClasses() const
UINT getMinimumClassLabel() const
bool load(const string &filename)
UINT getClassLabelIndexValue(const UINT classLabel) const
bool resetPlaybackIndex(const UINT playbackIndex)
string getClassNameForCorrespondingClassLabel(const UINT classLabel)
TimeSeriesClassificationDataStream getSubset(const UINT startIndex, const UINT endIndex) const
The ClassificationData is the main data structure for recording, labeling, managing, saving, and loading training data for supervised learning problems.
vector< MinMax > externalRanges
A vector containing a set of externalRanges set by the user.
MatrixDouble getTimeSeriesData(const TimeSeriesPositionTracker &trackerInfo) const
bool saveDatasetToFile(const string &filename)
This class can be used to track the class label, start and end indexs for labelled data...
UINT getMaximumClassLabel() const
string getDatasetName() const
vector< UINT > getClassLabels() const
TimeSeriesClassificationDataStream(const UINT numDimensions=0, const string datasetName="NOT_SET", const string infoText="")
UINT getNumSamples() const
vector< ClassificationSample > getClassificationSamples() const
bool setExternalRanges(const vector< MinMax > &externalRanges, const bool useExternalRanges=false)
TimeSeriesClassificationData getTimeSeriesClassificationData(const bool includeNullGestures=false) const
TimeSeriesClassificationData getAllTrainingExamplesWithClassLabel(const UINT classLabel) const
string datasetName
The name of the dataset.
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.
TimeSeriesClassificationDataStream & operator=(const TimeSeriesClassificationDataStream &rhs)
The TimeSeriesClassificationData is the main data structure for recording, labeling, managing, saving, and loading training data for supervised temporal learning problems. Unlike the ClassificationData, in which each sample consists of 1 N dimensional datum, a TimeSeriesClassificationData sample will consist of an N dimensional time series of length M. The length of each time series sample (i.e. M) can be different for each datum in the dataset.
bool setNumDimensions(const UINT numDimensions)
bool saveDatasetToCSVFile(const string &filename)
bool enableExternalRangeScaling(const bool useExternalRanges)
bool setDatasetName(const string datasetName)
vector< MinMax > getRanges() const
bool relabelAllSamplesWithClassLabel(const UINT oldClassLabel, const UINT newClassLabel)
string getInfoText() const
MatrixDouble getDataAsMatrixDouble() const
ErrorLog errorLog
Default error log.
vector< ClassTracker > getClassTracker() const
bool scale(const double minTarget, const double maxTarget)
bool save(const string &filename)
UINT eraseAllSamplesWithClassLabel(const UINT classLabel)
vector< TimeSeriesPositionTracker > getTimeSeriesPositionTracker() const
ClassificationSample & operator[](const UINT i)
bool setClassNameForCorrespondingClassLabel(const string className, const UINT classLabel)
bool loadDatasetFromFile(const string &filename)
bool addSample(const UINT classLabel, const VectorDouble &trainingSample)
string infoText
Some infoText about the dataset.
bool loadDatasetFromCSVFile(const string &filename, const UINT classLabelColumnIndex=0)
bool setInfoText(const string infoText)
virtual ~TimeSeriesClassificationDataStream()
ClassificationData getClassificationData(const bool includeNullGestures=false) const