Design of Classification Methods for Brain Computer Interfaces: An

Total Page:16

File Type:pdf, Size:1020Kb

Design of Classification Methods for Brain Computer Interfaces: An Informatics Engineering Degree Software Engineering Degree’s Final Project Design of classification methods for Brain Computer Interfaces: An application using the OpenViBE software Author Ibai Díez Oronoz 2015 Abstract Brain computer Interface (BCI) is a technology which is based on the acquisition of brain signals to be processed and interpreted by a computer, creating a direct communication pathway between the brain and an external device. This type of interfaces stablish a way to interact with the outside world by our thoughts as these interfaces allow transforming them into real actions in our environment. BCIs are often directed at assisting, augment- ing, or repairing human cognitive or sensory-motor functions. This Degree’s Final Project is focused on implementing and testing classification algo- rithms for BCIs because these algorithms are among the most important components of the translation of brain signals. Classification algorithms (CAs) are used in BCIs to pre- dict the human intention from the analysis of the signals, helping the computer to decode the human will from the signals and translate them into commands. Regarding the implementation and evaluation of these CAs, OpenViBE will be used. OpenViBE is a free software platform which is dedicated to designing, testing and us- ing BCIs and give us all the tools needed to test these algorithms. Moreover, it is a modular and multi-platform software which supports a vast selection of hardware elec- troencephalography (EEG) devices. In addition, it has different application fields such as medical, multimedia, robotics and all other domains related to BCIs and real-time neuro- science. Keywords: classification algorithms, BCI, OpenViBE, brain signal analysis. i Contents Abstracti Contents iii List of Figures ix List of Tables xiii PART 1: PROJECT MANAGEMENT1 1 Objectives of the project3 1.1 Introduction.................................3 1.2 Description.................................4 1.3 Contents of the thesis............................4 1.4 Background analysis............................5 1.5 Feasibility analysis.............................6 1.6 Project initial objectives...........................6 1.7 Project planning...............................6 1.7.1 Initial planning...........................7 1.7.2 Actual planning...........................9 iii CONTENTS 1.8 Resources.................................. 11 1.8.1 Operating system.......................... 11 1.8.2 OpenViBE............................. 11 2 State of the art: Classification methods for BCIs 13 2.1 Introduction................................. 13 2.2 Feature extraction.............................. 13 2.2.1 Signal conditioning......................... 14 2.2.2 Feature extraction.......................... 15 2.2.3 Feature conditioning (post-processing)............... 17 2.3 Feature translation............................. 18 2.3.1 Model selection........................... 18 2.3.2 Classification algorithms...................... 18 2.4 BCI paradigms............................... 23 2.4.1 P300................................ 24 2.4.2 Motor Imagery........................... 25 2.5 Optimization algorithms.......................... 26 2.5.1 Evolutionary algorithms...................... 26 2.5.2 Estimation of distribution algorithm................ 27 2.5.3 CMAES algorithm......................... 28 PART 2: TECHNICAL DEVELOPMENT 31 3 Algorithm development 33 3.1 k-Nearest Neighbors algorithm....................... 33 3.1.1 Description............................. 33 3.1.2 Algorithm.............................. 34 iv 3.1.3 Parameter selection......................... 35 3.1.4 Computation of distances...................... 35 3.2 k-Nearest Neighbors Equality algorithm.................. 37 3.2.1 Description............................. 37 3.2.2 Algorithm.............................. 37 3.3 Nearest CentroID.............................. 39 3.3.1 Description............................. 39 3.3.2 Algorithm.............................. 39 3.4 Naive Bayes algorithm........................... 41 3.4.1 Description............................. 41 3.4.2 Bayes’ Theorem.......................... 41 3.4.3 Algorithm.............................. 42 4 OpenViBE software 45 4.1 General aspects............................... 45 4.2 OpenViBE structure and features...................... 46 4.2.1 OpenViBE modules........................ 48 4.2.2 Classification module........................ 49 4.3 Motor Imagery BCI with CSP....................... 51 4.3.1 Scenarios.............................. 52 4.3.2 Common Spatial Pattern...................... 53 4.3.3 Classifier scenario......................... 55 4.4 P300 BCI Speller.............................. 57 4.4.1 Scenarios.............................. 57 4.4.2 Classifier scenario......................... 58 4.5 OpenViBE data features.......................... 60 v CONTENTS PART 3: VALIDATION AND CONCLUSIONS 61 5 Results 63 5.1 Introduction to experiments......................... 63 5.2 Characteristics of the BCI data used for validation............. 65 5.3 Experiments methodology......................... 67 5.4 Motor-Imagery experiment 1: k-nearest neighbors............. 68 5.4.1 Accuracies............................. 68 5.4.2 Performances and variance..................... 69 5.4.3 Study of k value.......................... 70 5.4.4 Sensitivity and specificity..................... 71 5.4.5 An illustrative example of the algorithm.............. 71 5.5 Motor-Imagery experiment 2: k-Nearest Neighbors Equality....... 73 5.5.1 Accuracies............................. 73 5.5.2 Performances and variance..................... 74 5.5.3 Study of k value.......................... 75 5.5.4 Sensitivity and specificity..................... 76 5.5.5 An illustrative example of the algorithm.............. 76 5.6 Motor-Imagery experiment 3: Nearest CentroID.............. 78 5.6.1 Accuracies............................. 78 5.6.2 Performances and variance..................... 79 5.6.3 Sensitivity and specificity..................... 80 5.6.4 An illustrative example of the algorithm.............. 80 5.7 Motor-Imagery experiment 4: Naive Bayes................. 82 5.7.1 Performances and variance..................... 82 5.7.2 Sensitivity and specificity..................... 82 vi 5.7.3 An illustrative example of the algorithm.............. 83 5.8 Motor-Imagery experiment 5: Classifier comparisons........... 85 5.9 P300 experiment 1: k-nearest neighbors.................. 88 5.9.1 Accuracies............................. 88 5.9.2 Performances and variance..................... 89 5.9.3 Study of k value.......................... 90 5.9.4 Sensitivity and specificity..................... 91 5.10 P300 experiment 2: k-Nearest Neighbors Equality............. 92 5.10.1 Accuracies............................. 92 5.10.2 Performances and variance..................... 93 5.10.3 Study of k value.......................... 94 5.10.4 Sensitivity and specificity..................... 95 5.11 P300 experiment 4: Nearest CentroID................... 96 5.11.1 Accuracies............................. 96 5.11.2 Performances and variance..................... 97 5.11.3 Sensitivity and specificity..................... 98 5.12 P300 experiment 4: Naive Bayes...................... 99 5.12.1 Performances and variance..................... 99 5.12.2 Sensitivity and specificity..................... 99 5.13 P300 experiment 5: Classifier comparisons................. 100 6 Conclusions and future work 103 6.1 Conclusions about the objectives...................... 103 6.2 Personal experience............................. 104 6.3 Future Work................................. 105 Appendices vii CONTENTS A Software installation 109 A.1 Ubuntu installation............................. 109 A.2 OpenViBE installation........................... 110 Bibliography 111 Acronyms 123 viii List of Figures 1.1 Initial Planning...............................8 1.2 Actual Planning............................... 10 2.1 Feature extraction workflow........................ 14 2.2 A signal before and after being conditioned................ 14 2.3 The procedure for extracting bandpower from a signal........... 16 2.4 The representation of Euclidean and Mahalanobis distances........ 17 2.5 Block diagram of a classification algorithm................ 19 2.6 A hyperplane which separates two classes: the "circles" an the "triangles" 19 2.7 SVM finds the optimal hyperplane for generalization........... 20 2.8 Rocchio Classification. Source: Wikipedia................. 22 2.9 P300 paradigm example to obtain brain signals.............. 24 2.10 A graphical representation of a signal and where the signal originates with P300 paradigm............................... 25 2.11 Right and left hand motor imagery paradigm example. Source: Trauma- trucos.................................... 25 2.12 General evolutionary algorithm workflow................. 26 2.13 The basic steps of an estimation of distribution algorithm......... 27 2.14 The basic steps of CMAES......................... 29 3.1 Example of KNN classification....................... 35 ix LIST OF FIGURES 3.2 Example of KNNE classification...................... 38 3.3 Example of Nearest CentroID classification................ 40 4.1 Workflow of the OpenViBE software.................... 46 4.2 Maximum signal scenario.......................... 47 4.3 Maximum signal scenario display..................... 48 4.4 Classifier trainer configuration layout................... 50 4.5 The motor imagery BCI with CSP: offline performance computations.. 53
Recommended publications
  • Brain Computer Interfaces
    Studiengang Medizinische Informatik BACHELOR THESIS Brain Computer Interfaces OpenViBE as a Platform for a P300 Speller Herbert S. Kisakye Matrikelnummer: 172588 E-Mail: [email protected] Heilbronn August 6, 2012 Supervisors: Prof. Dr. Rolf Bendl Dipl.-Inform. Med. C. Maier ACKNOWLEDGEMENTS This thesis is based on research I did in the Bio-Signal Laboratory at the Heilbronn University of Applied Sciences, in the summer of 2012. Without the help of different individuals I would never have been able to achieve much I am greatly indebted to Dipl.-Inform. Christoph Maier , for his readiness to take time out of his busy schedule, working on his Doctorate, to answer questions and give me invaluable guidance. I would like to thank Prof.Dr. Rolf Bendl immensely, for pointing me in this direction of a relatively new yet exciting field. Of course this work would never have come to fruition without the people, mostly fellow students at the university, that sat through many hours of repetitive, sometimes monotonous experiments and those that helped with a few technical aspects. Thank you all so much. Lastly a special thank you to all my friends and family for the emotional support. You kept me going. Herbert Sunday Kisakye III Abstract Aside from hardware, a major component of a Brain Computer Interface is the software that provides the tools for translating raw acquired brain signals into commands to control an application or a device. There’s a range of software, some proprietary, like MATLAB and some free and open source (FOSS), accessible under the GNU General Public License (GNU GPL).
    [Show full text]
  • BCI Software Platforms
    BCI Software Platforms C. Brunner, G. Andreoni, L. Bianchi, B. Blankertz, C. Breitwieser, S. Kanoh, C. A. Kothe, A. Lecuyer,´ S. Makeig, J. Mellinger, P. Perego, Y. Renard, G. Schalk, I. P. Susila, B. Venthur, and G. R. Muller-Putz¨ Abstract In this chapter, we provide an overview of publicly available software platforms for brain-computer interfaces. We have identified seven major BCI plat- forms and one platform specifically targeted towards feedback and stimulus pre- sentation. We describe the intended target user group (which includes researchers, programmers, and end users), the most important features of each platform such as availability on different operating systems, licences, programming languages in- volved, supported devices, and so on. These seven platforms are: (1) BCI2000, (2) OpenViBE, (3) TOBI Common Implementation Platform (CIP), (4) BCILAB, (5) C. Brunner, C. Breitwieser, G. R. Muller-Putz¨ Institute for Knowledge Discovery, Graz University of Technology, Austria, e-mail: clemens. [email protected] C. Brunner, C. A. Kothe, S. Makeig Swartz Center for Computational Neuroscience, INC, UCSD, San Diego, CA, USA G. Andreoni, P. Perego INDACO, Politecnico di Milano, Milan, Italy L. Bianchi Neuroscience Department, Tor Vergata University of Rome, Rome, Italy B. Blankertz, B. Venthur Machine Learning Laboratory, Berlin Institute of Technology, Berlin, Germany S. Kanoh Department of Electronics and Intelligent Systems, Tohoku Institute of Technology, Sendai, Japan J. Mellinger Institute of Medical Psychology and Behavioral Neurobiology, University of Tubingen,¨ Germany Y. Renard, A. Lecuyer´ National Institute for Research in Computer Science and Control (INRIA), Rennes, France G. Schalk Wadsworth Center, New York State Department of Health, Albany, NY, USA I.
    [Show full text]
  • Design and Implementation of a Brain-Computer Interface System
    Design and Implementation of a Brain-Computer Interface System Bastian Venthur Design and Implementation of a Brain-Computer Interface System Dipl.-Inform. Bastian Venthur aus Berlin Von der Fakultät IV – Elektrotechnik und Informatik der Technischen Universität Berlin zur Erlangung des akademischen Grades Doktor der Ingenieurwissenschaften (Dr.-Ing.) genehmigte Dissertation Prüfungsausschuss Vorsitzender: Prof. Dr. Klaus Obermayer 1. Gutachter: Prof. Dr. Klaus-Robert Müller 2. Gutachter: Prof. Dr. Benjamin Blankertz 3. Gutachter: Prof. Dr. Stefan Jähnichen 4. Gutachter: Prof. Dr. Gerwin Schalk Tag der wissenschaftlichen Aussprache: 18.3.2015 Berlin, 2015 D83 Abstract In this dissertation we present the results of our effort to provide a modular, completely free- and open source brain-computer interface (BCI) system in Python. While other BCI systems exist, they are usually monolithic and written in a low level programming language like C++. Monolithic BCI systems cover the whole BCI processing chain from data acquisition, to signal processing, and feedback- and stimulus presentation, but they also force the user to use the whole system. This is problematic, as a researcher who is specialized, for example, in methods development will probably already have a toolbox of algorithms in a programming language he is familiar with. Being forced to use a monolithic system, means he has to migrate the tools and algorithms to the monolithic system first, and then work in an unfamiliar environment. Being written in C++, those BCI systems also make it unnecessary hard for non-computer scientists to add new functionality to those systems. Even among computer scientists, C++ is notorious for the skill level required to write decent C++ code.
    [Show full text]
  • BCI Software Platforms
    BCI Software Platforms C. Brunner, G. Andreoni, L. Bianchi, B. Blankertz, C. Breitwieser, S. Kanoh, C. A. Kothe, A. Lecuyer,´ S. Makeig, J. Mellinger, P. Perego, Y. Renard, G. Schalk, I. P. Susila, B. Venthur, and G. R. Muller-Putz¨ Abstract In this chapter, we provide an overview of publicly available software platforms for brain-computer interfaces. We have identified seven major BCI plat- forms and one platform specifically targeted towards feedback and stimulus pre- sentation. We describe the intended target user group (which includes researchers, programmers, and end users), the most important features of each platform such as availability on different operating systems, licences, programming languages in- volved, supported devices, and so on. These seven platforms are: (1) BCI2000, (2) OpenViBE, (3) TOBI Common Implementation Platform (CIP), (4) BCILAB, (5) C. Brunner, C. Breitwieser, G. R. Muller-Putz¨ Institute for Knowledge Discovery, Graz University of Technology, Austria, e-mail: clemens. [email protected] C. Brunner, C. A. Kothe, S. Makeig Swartz Center for Computational Neuroscience, INC, UCSD, San Diego, CA, USA G. Andreoni, P. Perego INDACO, Politecnico di Milano, Milan, Italy L. Bianchi Neuroscience Department, Tor Vergata University of Rome, Rome, Italy B. Blankertz, B. Venthur Machine Learning Laboratory, Berlin Institute of Technology, Berlin, Germany S. Kanoh Department of Electronics and Intelligent Systems, Tohoku Institute of Technology, Sendai, Japan J. Mellinger Institute of Medical Psychology and Behavioral Neurobiology, University of Tubingen,¨ Germany Y. Renard, A. Lecuyer´ National Institute for Research in Computer Science and Control (INRIA), Rennes, France G. Schalk Wadsworth Center, New York State Department of Health, Albany, NY, USA I.
    [Show full text]
  • Brain Computer Interfaces for Games
    Masaryk University Faculty of Informatics Brain Computer Interfaces for Games Master’s Thesis Bc. Roman Konečný Brno, Fall 2017 Masaryk University Faculty of Informatics Brain Computer Interfaces for Games Master’s Thesis Bc. Roman Konečný Brno, Fall 2017 This is where a copy of the official signed thesis assignment and a copy ofthe Statement of an Author is located in the printed version of the document. Declaration Hereby I declare that this paper is my original authorial work, which I have worked out on my own. All sources, references, and literature used or excerpted during elaboration of this work are properly cited and listed in complete reference to the due source. Bc. Roman Konečný Advisor: Doc. Fotis Liarokapis PhD i Acknowledgement I want to thank all the wonderful people who have supported me in my studies and writing this thesis. I also want to thank my supervisor doc. Fotios Liarokapis, PhD for his guidance, support and kindness. iii Abstract The aim of this master’s thesis is to create a novel application for con- trolling simple computer games through EEG technology and conduct an experiment focusing on the playability of such a game on 30 test subjects. Data from the device used for the brain computer interaction should be collected and analyzed, as well as the questionnaires used for measuring the user experience. The goal of the project is to propose a suitable EEG hardware for the purposes of the application, designing and developing the application itself, running the experiment and gathering and analyzing the data that was collected, especially the correlations between the achieved results and gender.
    [Show full text]
  • Openvibe: an Open-Source Software Platform to Design, Test And
    OpenViBE: An Open-Source Software Platform to Design, Test and Use Brain-Computer Interfaces in Real and Virtual Environments Yann Renard1,∗, Fabien Lotte1, Guillaume Gibert2, Marco Congedo3, Emmanuel Maby2, Vincent Delannoy1, Olivier Bertrand2, Anatole Lecuyer´ 1,∗ 1INRIA Rennes, FRANCE 2INSERM U821, Lyon, FRANCE 3INPG Gipsa-Lab, Grenoble, FRANCE 1 ∗Corresponding authors: Yann Renard Anatole Lecuyer´ Bunraku Team Bunraku Team INRIA Rennes - Bretagne Atlantique INRIA Rennes - Bretagne Atlantique Campus universitaire de Beaulieu Campus universitaire de Beaulieu 35042 Rennes Cedex 35042 Rennes Cedex FRANCE FRANCE [email protected] [email protected] 2 Abstract This paper describes the OpenViBE software platform which enables to design, test and use Brain-Computer Interfaces. Brain-Computer Interfaces (BCI) are communication systems that enable users to send commands to computers only by means of brain activity. BCI are gaining interest among the Virtual Reality (VR) community since they have appeared as promising interaction devices for Virtual Environments (VE). The key features of the platform are 1) a high modularity, 2) embedded tools for visualization and feedback based on VR and 3D displays, 3) BCI design made available to non-programmers thanks to visual programming and 4) various tools offered to the different types of users. The platform features are illustrated in this paper with two entertaining VR applications based on a BCI. In the first one, users can move a virtual ball by imagining hand movements, while in the second one, they can control a virtual spaceship using real or imagined foot movements. Online experiments with these applications together with the evaluation of the platform computational performances showed its suitability for the design of VR applications controlled with a BCI.
    [Show full text]