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_VotingClassifier.rst 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. .. _Doc_BoxAlgorithm_VotingClassifier:
  2. Voting Classifier
  3. =================
  4. .. container:: attribution
  5. :Author:
  6. Yann Renard
  7. :Company:
  8. INRIA
  9. .. image:: images/Doc_BoxAlgorithm_VotingClassifier.png
  10. Each classifier used as input is assumed to have its own two-class output stream. Mainly designed for P300 scenario use.
  11. The purpose of this simple classifier is to choose between multiple two class classifiers which
  12. one mostly fits a condition. For example imagine ``n`` states. Each of those states can be either active
  13. or inactive. Additionally, imagine you want only one active state at a time. Then you can have ``n``
  14. two-class classifiers telling for each state if it is active or not, and a following voting classifier
  15. that chooses which of those states is the *most active*.
  16. Inputs
  17. ------
  18. .. csv-table::
  19. :header: "Input Name", "Stream Type"
  20. "Classification result 1", "Stimulations"
  21. "Classification result 2", "Stimulations"
  22. You can add as many inputs as you need depending on the number of preceeding states.
  23. The inputs of this classifier can be changed to either streamed matrix of stimulations.
  24. In the case you choose stimulations, each active stimulation gives a point
  25. to the preceeding state. Both an inactive and a reject stimulation gives no point.
  26. Any other stimulation is ignored.
  27. After a number of repetitions, the state with the best score is chosen.
  28. In the case you choose streamed matrix, the matrix must have only one
  29. element. This element is used as a score coefficient (in place of the simple 1-0 of the previous
  30. case). After a number of repetitions, the state with the best score is chosen.
  31. Classification result 1
  32. ~~~~~~~~~~~~~~~~~~~~~~~
  33. Input stream for the first state.
  34. Classification result 2
  35. ~~~~~~~~~~~~~~~~~~~~~~~
  36. Input stream for the second state.
  37. Outputs
  38. -------
  39. .. csv-table::
  40. :header: "Output Name", "Stream Type"
  41. "Classification choice", "Stimulations"
  42. Classification choice
  43. ~~~~~~~~~~~~~~~~~~~~~
  44. This output sends a new stimulation as soon as the classifier received the correct number of votes
  45. from the preceeding states. The output stimulation is based on the 5th setting of the box. First
  46. state being selected would send exactly this stimulation. Second state would send this
  47. stimulation + 1 etc.
  48. .. _Doc_BoxAlgorithm_VotingClassifier_Settings:
  49. Settings
  50. --------
  51. .. csv-table::
  52. :header: "Setting Name", "Type", "Default Value"
  53. "Number of repetitions", "Integer", "12"
  54. "Target class label", "Stimulation", "OVTK_StimulationId_Target"
  55. "Non target class label", "Stimulation", "OVTK_StimulationId_NonTarget"
  56. "Reject class label", "Stimulation", "OVTK_StimulationId_Label_00"
  57. "Result class label base", "Stimulation", "OVTK_StimulationId_Label_01"
  58. "Choose one if ex-aequo", "Boolean", "false"
  59. Number of repetitions
  60. ~~~~~~~~~~~~~~~~~~~~~
  61. This setting tells the box how many votes it needs before choosing. If the box uses stimulations,
  62. it must receive either the target or non target stimulation to consider a state has been voted.
  63. Additionaly, the box waits each state to be voted the correct number of times to take a decision.
  64. Target class label
  65. ~~~~~~~~~~~~~~~~~~
  66. If the box uses stimulations, this settings tells what stimulation reflects that the state is active.
  67. Non target class label
  68. ~~~~~~~~~~~~~~~~~~~~~~
  69. If the box uses stimulations, this settings tells what stimulation reflects that the state is inactive.
  70. Reject class label
  71. ~~~~~~~~~~~~~~~~~~
  72. In case no choice can be made (for example, there are more than one state with the highest score), the
  73. voting classifier can choose to reject the vote and send a specific stimulation for this. This is more
  74. likely to happen when the box works on stimulation better than streamed matrix. You can force this box
  75. to choose using the 6th setting.
  76. Result class label base
  77. ~~~~~~~~~~~~~~~~~~~~~~~
  78. This stimulation is used as a basis for the stimulations to send when a state is selected. First
  79. state being selected would send exactly this stimulation. Second state would send this
  80. stimulation + 1 etc.
  81. Choose one if ex-aequo
  82. ~~~~~~~~~~~~~~~~~~~~~~
  83. This setting can force the box to choose a state even if more than one state have the highest score.
  84. In such case, there won't be any rejection. The way the box decides between the ex-aequo candidates
  85. is undefined.
  86. .. _Doc_BoxAlgorithm_VotingClassifier_Examples:
  87. Examples
  88. --------
  89. This box is used in the *P300 speller* and the *P300 magic card* BCIs. Please see those
  90. scenarios in the sample *openvibe-scenarios*.