32 #ifndef GRT_CLASSIFICATION_DATA_STREAM_HEADER 33 #define GRT_CLASSIFICATION_DATA_STREAM_HEADER 35 #include "../Util/GRTCommon.h" 53 ClassificationDataStream(
const UINT numDimensions=0,
const std::string datasetName =
"NOT_SET",
const std::string infoText =
"");
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 addSample(
const UINT classLabel,
const VectorFloat &sample);
164 bool addSample(
const UINT classLabel,
const MatrixFloat &sample);
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);
234 bool resetPlaybackIndex(
const UINT playbackIndex);
260 bool save(
const std::string &filename);
270 bool load(
const std::string &filename);
278 bool saveDatasetToFile(
const std::string &filename);
287 bool saveDatasetToCSVFile(
const std::string &filename);
295 bool loadDatasetFromFile(
const std::string &filename);
307 bool loadDatasetFromCSVFile(
const std::string &filename,
const UINT classLabelColumnIndex=0);
315 bool printStats()
const;
357 UINT getMinimumClassLabel()
const;
364 UINT getMaximumClassLabel()
const;
371 UINT getClassLabelIndexValue(
const UINT classLabel)
const;
378 std::string getClassNameForCorrespondingClassLabel(
const UINT classLabel);
437 ClassificationData getClassificationData(
const bool includeNullGestures =
false )
const;
470 UINT totalNumSamples;
477 std::deque< ClassificationSample > data;
487 #endif //GRT_TIME_SERIES_CLASSIFICATION_DATA_STREAM_HEADER
Vector< TimeSeriesPositionTracker > getTimeSeriesPositionTracker() const
UINT getNumSamples() const
This class can be used to track the class label, start and end indexs for labelled data...
DebugLog debugLog
Default debugging log.
ErrorLog errorLog
Default error log.
bool useExternalRanges
A flag to show if the dataset should be scaled using the externalRanges values.
UINT getNumDimensions() const
Vector< MinMax > externalRanges
A Vector containing a set of externalRanges set by the user.
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.
std::string infoText
Some infoText about the dataset.
UINT numDimensions
The number of dimensions in the dataset.
std::string datasetName
The name of the dataset.
Vector< ClassTracker > getClassTracker() const
UINT getNumClasses() const
std::deque< ClassificationSample > getClassificationSamples() const
std::string getInfoText() const
This class stores the class label and raw data for a single labelled classification sample...
WarningLog warningLog
Default warning log.
std::string getDatasetName() const