32 #ifndef GRT_CLASSIFICATION_DATA_STREAM_HEADER
33 #define GRT_CLASSIFICATION_DATA_STREAM_HEADER
35 #include "../Util/GRTCommon.h"
216 bool scale(
const Float minTarget,
const Float maxTarget);
260 bool save(
const std::string &filename);
270 bool load(
const std::string &filename);
470 UINT totalNumSamples;
477 std::deque< ClassificationSample > data;
487 #endif //GRT_TIME_SERIES_CLASSIFICATION_DATA_STREAM_HEADER
bool loadDatasetFromCSVFile(const std::string &filename, const UINT classLabelColumnIndex=0)
TimeSeriesClassificationData getTimeSeriesClassificationData(const bool includeNullGestures=false) const
UINT eraseAllSamplesWithClassLabel(const UINT classLabel)
Vector< TimeSeriesPositionTracker > getTimeSeriesPositionTracker() const
UINT getNumSamples() const
The ClassificationData is the main data structure for recording, labeling, managing, saving, and loading training data for supervised learning problems.
bool enableExternalRangeScaling(const bool useExternalRanges)
This class can be used to track the class label, start and end indexs for labelled data...
bool save(const std::string &filename)
bool setDatasetName(const std::string datasetName)
ClassificationDataStream(const UINT numDimensions=0, const std::string datasetName="NOT_SET", const std::string infoText="")
ClassificationDataStream & operator=(const ClassificationDataStream &rhs)
bool resetPlaybackIndex(const UINT playbackIndex)
bool setExternalRanges(const Vector< MinMax > &externalRanges, const bool useExternalRanges=false)
std::string getClassNameForCorrespondingClassLabel(const UINT classLabel)
bool saveDatasetToCSVFile(const std::string &filename)
bool scale(const Float minTarget, const Float maxTarget)
virtual ~ClassificationDataStream()
bool load(const std::string &filename)
DebugLog debugLog
Default debugging log.
ClassificationData getClassificationData(const bool includeNullGestures=false) const
Vector< UINT > getClassLabels() const
ErrorLog errorLog
Default error log.
bool useExternalRanges
A flag to show if the dataset should be scaled using the externalRanges values.
ClassificationDataStream getSubset(const UINT startIndex, const UINT endIndex) const
UINT getNumDimensions() const
bool loadDatasetFromFile(const std::string &filename)
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.
ClassificationSample getNextSample()
std::string infoText
Some infoText about the dataset.
UINT getMaximumClassLabel() const
bool setInfoText(const std::string infoText)
UINT numDimensions
The number of dimensions in the dataset.
std::string datasetName
The name of the dataset.
bool relabelAllSamplesWithClassLabel(const UINT oldClassLabel, const UINT newClassLabel)
UINT getMinimumClassLabel() const
MatrixFloat getDataAsMatrixFloat() const
Vector< ClassTracker > getClassTracker() const
bool addSample(const UINT classLabel, const VectorFloat &sample)
bool saveDatasetToFile(const std::string &filename)
UINT getNumClasses() const
std::deque< ClassificationSample > getClassificationSamples() const
bool setNumDimensions(const UINT numDimensions)
std::string getInfoText() const
MatrixFloat getTimeSeriesData(const TimeSeriesPositionTracker &trackerInfo) const
Vector< MinMax > getRanges() const
ClassificationSample & operator[](const UINT i)
WarningLog warningLog
Default warning log.
TimeSeriesClassificationData getAllTrainingExamplesWithClassLabel(const UINT classLabel) const
UINT getClassLabelIndexValue(const UINT classLabel) const
bool setClassNameForCorrespondingClassLabel(const std::string className, const UINT classLabel)
std::string getDatasetName() const