Classifier processor

Summary

Doc_BoxAlgorithm_ClassifierProcessor.png
  • Plugin name : Classifier processor
  • Version : 1.0
  • Author : Yann Renard
  • Company : INRIA/IRISA
  • Short description : Generic classification, relying on several box algorithms
  • Documentation template generation date : Oct 18 2012

Description

The Classifier Processor box is a generic box for classification purpose. It works in cunjunction with the Classifier trainer box. This box' role is to expose a generic interface to the rest of the BCI pipelines. The tasks specific to a given classifier are forwarded to one of the registered OVTK_TypeId_ClassifierAlgorithm algorithms. The behavior is simple, at initialization phase, the classification algorithm is initialized and its configuration is loaded from the configuration file. Then each time this box receives a new feature vector, it is forwarded to the classification algorithm that classifies it. The box gets the algorithm status and the actual class value and translates this information to its output. The class is sent in the form of a stimulation and the algorithm status is sent in the form a streamed matrix. The stimulation can be generically interpreted by the rest of the pipeline but it is important to understand that each classification algorithm is free to report whatever it wants in its "status matrix". Consequently, the use of this output stream will be depedendent on the choosen classification algorithm. For example, the LDA classifier sends the hyperplane distance value as its status.

Inputs

1. Features

This input should be connected to the feature vectors to classify. Each time a new feature vector arrives, a classification process will be triggered. Consequently, a classification stimulation will be sent on the first output of this box.

  • Type identifier : Feature vector (0x17341935, 0x152ff448)

Outputs

1. Labels

This output will contain the classification stimulations. Each time a new feature vector arrives to this box, a new classification process is triggered, resuling int the generation of the corresponding class stimulation.

  • Type identifier : Stimulations (0x6f752dd0, 0x082a321e)

2. Classification state

This output reflects the classification algorithm status in the form of a matrix of value. The content of this matrix is dependent of the choosen classification algorithm. For example, the LDA classifier sends the hyperplane distance as its status. Given that this value is dependent of the choosen algorithm, you should be very carefull with the use of this output stream. Unexepected behavior may (will) occur when changing the classifier.

  • Type identifier : Streamed matrix (0x544a003e, 0x6dcba5f6)

Settings

1. Classifier to use

The first setting of this box is the classifier to use. You have to choose the same classifier as the one you used during the training phase with the Classifier trainer box.

  • Type identifier : Classification algorithm (0x21ce7f37, 0x28def186)
  • Default value : [ Support Vector Machine (SVM) ]

2. Filename to load configuration from

This setting points to the configuration file of the algorithm. This configuration file is generally generated from the Classifier trainer box. Its syntax depends on the selected algorithm.

  • Type identifier : Filename (0x330306dd, 0x74a95f98)
  • Default value : [ ]

3. Reject class label

For classification algorithms that support rejection, you can choose a stimulation that reflects the feature vectore could not be classified.

  • Type identifier : Stimulation (0x2c132d6e, 0x44ab0d97)
  • Default value : [ OVTK_StimulationId_Label_00 ]

4. Class 1 label

This is the stimulation to send when the classifier algorithm detects a class-1 feature vector

  • Type identifier : Stimulation (0x2c132d6e, 0x44ab0d97)
  • Default value : [ OVTK_StimulationId_Label_01 ]

5. Class 2 label

  • Type identifier : Stimulation (0x2c132d6e, 0x44ab0d97)
  • Default value : [ OVTK_StimulationId_Label_02 ]

Examples

This box is used in BCI pipelines in order to classify cerebral activity states. For a detailed scenario using this box and its associated Classifier trainer, please see the motor imagary BCI scenario in the sample scenarios.

Miscellaneous