You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Doc_BoxAlgorithm_ClassifierProcessor.rst 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. .. _Doc_BoxAlgorithm_ClassifierProcessor:
  2. Classifier processor
  3. ====================
  4. .. container:: attribution
  5. :Author:
  6. Yann Renard, Guillaume Serriere
  7. :Company:
  8. INRIA/IRISA
  9. .. image:: images/Doc_BoxAlgorithm_ClassifierProcessor.png
  10. Classifies incoming feature vectors using a previously learned classifier.
  11. The *Classifier Processor* box is a generic box for classifying data (feature vectors).
  12. It works in conjunction with the :ref:`Doc_BoxAlgorithm_ClassifierTrainer` box.
  13. This box' role is to expose a generic interface to the rest of the BCI pipeline. The
  14. vectors to classify are forwarded to an algorithm or a structure of algorithms depending on what is
  15. described in the loaded configuration file. The behavior is simple: at initialization phase, the classification
  16. structure is initialized and its configuration is loaded from the configuration file. Then each time this box
  17. receives a new feature vector, it is forwarded to the classification algorithm that classifies it. The box gets the algorithm
  18. status and the actual class value and translates this information to its output. The predicted class is sent out in
  19. the form of a stimulation and the algorithm status is sent in the form a streamed matrix. The stimulation can be generically
  20. interpreted by the rest of the pipeline but it is important to understand that each classification algorithm is
  21. free to report whatever it wants in its "status matrix". Consequently, the use of this output stream will be
  22. dependent on the chosen classification algorithm. For example, the LDA classifier sends the hyperplane distance
  23. value as its status.
  24. Inputs
  25. ------
  26. .. csv-table::
  27. :header: "Input Name", "Stream Type"
  28. "Features", "Feature vector"
  29. "Commands", "Stimulations"
  30. Features
  31. ~~~~~~~~
  32. This input should be connected to the feature vector stream to classify. Each time a new feature vector arrives,
  33. a classification process will be triggered. Consequently, a classification stimulation will be sent on the
  34. first output of this box.
  35. Outputs
  36. -------
  37. .. csv-table::
  38. :header: "Output Name", "Stream Type"
  39. "Labels", "Stimulations"
  40. "Hyperplane distance", "Streamed matrix"
  41. "Probability values", "Streamed matrix"
  42. Labels
  43. ~~~~~~
  44. This output will contain the classification stimulations. Each time a new feature vector arrives to this box,
  45. a new classification process is triggered, resulting in the generation of the corresponding class stimulation.
  46. Hyperplane distance
  47. ~~~~~~~~~~~~~~~~~~~
  48. This output reflects the classification algorithm status in the form of a matrix of value. This output will contain one or several distances
  49. to an hyperplane if the classifier provide it. If not, the matrix will have 0 dimension. The format of this output directly depend on
  50. the classification algorithm and of the strategy used by the processor box.
  51. Probability values
  52. ~~~~~~~~~~~~~~~~~~
  53. This output reflects the classification algorithm status in the form of a matrix of value. This output will contains one or several probabilities
  54. for a data to be on a class if the classifier provide it. If not, the matrix will have 0 dimension. The format of this output directly depend on
  55. the classification algorithm and of the strategy used by the processor box.
  56. .. _Doc_BoxAlgorithm_ClassifierProcessor_Settings:
  57. Settings
  58. --------
  59. .. csv-table::
  60. :header: "Setting Name", "Type", "Default Value"
  61. "Filename to load configuration from", "Filename", ""
  62. Filename to load configuration from
  63. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  64. This setting points to the configuration file of the box generated by the
  65. :ref:`Doc_BoxAlgorithm_ClassifierTrainer` box. Its syntax depends on the selected algorithm.
  66. .. _Doc_BoxAlgorithm_ClassifierProcessor_Examples:
  67. Examples
  68. --------
  69. This box is used in BCI pipelines in order to classify cerebral activity states. For a detailed scenario using this
  70. box and its associated :ref:`Doc_BoxAlgorithm_ClassifierTrainer`, please see the **motor imagary**
  71. BCI scenario in the sample scenarios.