Skip to content

classification_data

nickgillian edited this page Aug 15, 2016 · 2 revisions

#ClassificationData

##Description The ClassificationData is the main data structure for recording, labeling, managing, saving, and loading training data for supervised learning problems.

The data structure stores pairs of samples, with each pair containing:

  • class label (unsigned int) representing the supervised class label for that sample
  • sample (VectorFloat), an N-dimensional vector containing the data for that sample

The data structure also stores some basic meta data, such as the dimensionality of the data, the names for each class, an info string containing information about the contents of the data, etc..

As of GRT revision 347, this replaces the LabelledClassificationData data structure, however a typedef enables you to still use the LabelledClassificationData in your old code if needed.

##Suitable Classification Algorithms The ClassificationData data structure should be used to train the following GRT classification algorithms:

You can also use the ClassificationData to train the Multi-Layer Perceptron (MLP) algorithm, if you want to use the MLP for classification.

##Things You Need To Know There are two key things you should know about the ClassificationData class.

  • You should set the number of input dimensions of your dataset before you try and add samples to the training dataset (see the example below for how to do this).
  • You should not use the class label of 0 when you add a new sample to your dataset. This is because the class label of 0 is reserved for the special null gesture class. This tutorial provides more information about the null gesture class. If you want to use the class label of 0, then you should call the setAllowNullGestureClass( true ) function.

##Example ClassificationData Example