How To Easily Find Online EEG Datasets Using MOABB

A Beginner’s Guide to Brain-Computer Interfaces (part 5)

--

EEG data is cool! But how to get it when you cannot measure the data yourself?

Starting a hobby project in the field of brain-computer interfaces can be hard. How to get your data? Buying an EEG device can already be a roadblock in your hobby project while you haven’t even started yet with the fun part: coding!

Luckily, there are some great public EEG datasets freely available online. However, datasets useful for your project may be hard to find. Moreover, these datasets can be in a weird format, and some important additional information may not be given..

Luckily, these problems are solved by the great developers of MOABB: The Mother of all BCI Benchmarks. MOABB is an open science project, aiming to build a benchmark of popular BCI algorithms applied on freely available EEG datasets. The code is available on Github, and a documentation is available as well.

This blog post is meant to reach BCI enthusiasts struggling with starting their BCI project, who did not know about MOABB. I sure wish I had learned about MOABB earlier in my project, as I struggled a lot with quickly testing some ideas about my algorithms without the need of collecting data myself.

This post is not an exhaustive explanation about everything possible with MOABB. Only the bare essentials to get started with MOABB quickly are explained. A more extensive tutorial can be found on this Github page, and for more information about MOABB, I gladly refer you to their documentation.

Let’s go over the basics and start coding!

Installation

Installation is simple. Write in your command prompt the following:

And you’re set!

Getting the data

Say, you want to collect some data about left hand and right hand motor imagery. Datasets with these two classes are pretty popular, and MOABB has a build in paradigm for them. We can search for the available datasets of this paradigm using only 4 lines of code!

Giving as output:

Next, we load these datasets:

As these datasets differ a lot in their setup, you may benefit from reading the descriptions of the datasets in the MOABB documentation.

Evaluation

Now we have all our data! Now, you can go ahead and try one of the most popular pipelines in motor imagery BCIs: CSP with LDA (More on CSP in later blog posts!)

Easy as that, you will have quick results about your newly developed algorithm or pipeline!

I hope this quick tutorial helped you getting starting in the field of BCI.Please check out the publication page, where more practical BCI tutorials like this one will be posted in the future, and give me a follow to be notified for further posts!

Happy coding!

--

--

Tim de Boer
A Beginner’s Guide to Brain-Computer Interfaces

Master graduate AI @VU Amsterdam. Currently learning and writing about building brain-computer interfaces. Support me: https://timdb877.medium.com/membership