Favorite algorithms for EEG features analysis


#1

Hey guys,

I would like to know which are your favorite algorithms for EEG signal analysis (data recorded with the Muse).

My personal favorites are:

  • For an optimized feature representation:
    Principal component analysis (PCA), unsupervised
    Fisher, or linear, discriminant analysis (FDA/LDA), supervised

I don’t use the independent-component-analysis (ICA), because I find that PCA can do a good enough job, while being less computer-intensive. I do acknowledge that the ICA is, theoretically, superior to the PCA, I just don’t think that it’s worth doing the computations, unless you are in a research environment. Care to argue?

  • For classification
    Naive Bayes
    Support-vector-machine (SVM)
    Multi-Layer Perceptron (MLP)

I don’t don’t have applications that regression at the present, but is anyone doing it? Which algos are you recommanding?

Fred


#2

I don’t know why I didn’t think of this earlier. The fact is that I opened some of my eeg datasets, recorded with the Muse, and the Matlab code I used to analyse them. If you guys want to discuss this matter further, feel free to compare your analysis tool with mine.


#3

Hi @atom2626

I recently completed a large scale game of competitive mindfulness for an exhibition with over 8,000 attendees. I had a constant stream of participants (and around 400 spectators) who wanted to play so I had to come up with an algorithm that wouldn’t require extensive calibration time.

In the end I chose to use this equation:
[INDENT]arousal = (beta - theta) / (beta + theta)
mindfulness = arousal - mellow[/INDENT]

It was sufficient to respond well to concentrated relaxation rather than just sleepiness.

This is based on the cognitive valence model but because Muse are so awesome, they already give us the relative values averaged across all channels so the calculations are insanely simple and really fast.

I’m interested to hear what flaws you see in this model and whether there are any others you would suggest looking into.

Cheers
Mic.


#4

Don’t use the post link feature, it doesn’t work properly. Please post again your facebook page, I would like to see that.

Thanks for sharing your algorithm. If it works, there is no problem with it. If you know, however, the specific channels in which theta and beta modulation is the strongest, you might benefit of not averaging all channels together and focusing solely on where the information is. To put this in perspective, if only one channel was carrying information and you were to average it with 2 more, you might still be able to pick up the desired signal. If you were to average it with a 100 more, then you can be sure to lose your signal to background noise.

The process I’m currently using, but it’s only for the sake of simplicity:

Each sample consists in the single Fourier transform term corresponding to 10Hz, computed over a 0.5 seconds time window (110 data points). I take out any samples for which I detect and eye blink. I only consider the power in channels 0 and 3, since these two carry the strongest 10Hz modulation.

Calibration phase:
Record 20 samples, while the participant is awake and mentally active. Compute the mean and standard deviation of the sampled values.

Test phase:
(sample - mean)/standard_deviation

This is a quick and simple normalization procedure that defines a standard normal distribution reference frame. If the participant is relaxing samples should be above 0 and shouldn’t exceed a value of 3. I then feed this transformed signal to a leaky-integrator, which takes care of filtering the signal.

I get very reliable results for relaxation with eyes closed vs. awake state and the good things is that the system trains in approximately 10 to 15 seconds.

Here’s the system running, you’ll see both the training phase and test phase.


#5

You’re right about the “post link” feature.

Here’s the direct link to what I did:
https://www.facebook.com/thewondergamesau/timeline/story?ut=43&wstart=0&wend=1443682799&hash=-2540569583148658833&pagefilter=3

I forgot to mention I was filtering out eye blink and jaw clench too.

I’m interested in why you didn’t use the built in relative values from the muse-io?


#6

Good question. We are developing an independent platform for EEG signal processing (that I hope will make hacking with the Muse much easier, at least to hack with the Raspberry Pi). I am myself a trained Phd student in neurophysiology who worked with intra-cortical, multiple electrodes recording, in animal models. It is somewhat different from EEG signal analysis, but the foundations are the same. Consequently, I am both required and interested in coming up with my own metrics.

Regardless, the band power provided by the Muse are by the book measurements. The Mellow and Concentration are, however, qualitative measurements that don’t quite fit in my formal approach to EEG signal processing. Anyway, I have my equivalent to Mellow in the 10 Hz component, I described above, and I already have observed gamma band frequency power modulation in frontal channels (equivalent to concentration), I just haven’t made a use out of it yet.

In the short future, I hope to get my hand on two extra sensors that plugs into the muse (I saw them at a Hackathon) with the aim of picking up motor related activity (Mu power band generally on the side of the head, above the ears), a common paradigm in the BCI scientific literature, but it will have to wait a few months before I begin looking into this.

Given this, I learned about a few more algorithms that are apparently very robust, while being not to computation greedy. Let me list them here, but I still didn’t had the time to work with them:
Common Spatial Pattern (CSP): https://en.wikipedia.org/wiki/Common_spatial_pattern
Riemannian Geometry: https://hal.archives-ouvertes.fr/hal-00602700/document
and the most powerful one, according to their authors:
[SIZE=15px]tangent space LDA : try to find, Multiclass brain-computer interface classification by Riemannian Geometry (which also covers the previous algorithm)[/SIZE]


#7

Hello guys,

I am a graduate student from University of Texas, and currently I am working with Muse for one of my projects. We are attempting to find if a person is drowsy while driving, using Muse and will create an Android app with it. We are testing using a driving simulator. Reading about the mindfulness application, I wanted to know if you had any success with finding if a person is feeling drowsy. And also which algorithm worked best with Muse data.

Any help would be great.

Thanks,
Tasnim


#8

Typically people use alpha wave for that. Here’s an introduction to alpha wave reading with the Muse:
http://www.atlantsembedded.com/b/tutorial-what-alpha-wave

Search on google scholar, I believe several studies have been published on that topic.


#9

Hello guys,

I’m currently working with Muse and I hope to classify behaviors using Muse data. I’ve collected the EEG data and I can already see the difference in the brainwaves between different situations. However, since I’m new to signal processing and matlab, I don’t really know how to get started to extract features from the .mat files I get. Do I need to first remove artifacts? Are there any tutorials that can help me get started? I hope to extract some features and then train a Machine Learning classifier to be able to distinguish between different activities.

Thanks,
Tony


#10

Hi,@micslab,
I’m very interested in your algorithm about arousal : arousal = (beta - theta) / (beta + theta).
I wonder that did you use average of relative values of beta/theta from 4 electrodes, or from some of 4 electrodes?
Thanks a lot!


#11

Hi @qinjingxue

Thanks for your interest.

We decided to run our own averages using a fixed bounds as relative averaging produced some wild results over time, and it gave us the opportunity to reset the average ourselves before each new person used the headset.

We tried from all electrodes but ended up with an interesting alpha asymmetry consideration just on 2 electrodes, using the remaining 2 electrodes as ‘supporting evidence’ with a lesser influence on the score. Unfortunately by this point we’d gone off track from any approved science and were using anecdotal evidence to evaluate- so it probably is highly subjective. Worked for us and the 100+ brains we’ve tried it on though.

Are you a member of the slack group neurotechx? you can find me on there under the _Australia channel.