BIAPT / eeg-pain-detection

Repository for detection of pain from EEG brain signals using machine learning
5 stars 2 forks source link

Train a linear SVM on the channel power feature at alpha #14

Closed yacineMahdid closed 4 years ago

yacineMahdid commented 4 years ago

We know that at alpha we should have some kind of EEG effect picked up by the channel on the temporal lobes. A good first step would be to use a simple linear SVM and to train it on each channel power at alpha and look at the performance (accuracy for now).

yacineMahdid commented 4 years ago

I was able to create my data-frame for channel-wise power at alpha. The missing values are codified as NaN values. To complete this task I will use the previous jupyter notebook as a template and improve it.

yacineMahdid commented 4 years ago

I've got some marginal improvement on what we had before by just having more features!

However there are a lot of thing we have to fix up here before calling it a day:

We see a slight boost in accuracy for MSK, but a significant drop for Healthy. However there are a few of the participant which were way below the random line. We should investigate the feature of these participant before and after soft normalization.

I found that there was a weird column at the end, might have been added there in the processing of the data with MATLAB. Still not sure why it's doing this but I found out more information over here on StackOverflow. This might affect the classification because of the scaler.

Update I think I found the issue, there is no hot for this participant: HE007. When the classifier is trying to classify the participant it output only 1 whereas it should have outputed 0 instead. This is how we can get to 0% accuracy. I've checked in the recording and there was absolutely nothing in HE007 hot1.set file, this should be removed.

This problem we just encountered tells me we should have the proportion of baseline vs hot window per participants and check if any of them are highly unbalanced.

Increasing the windowing up to a sliding window of size 1s. We got the following:

WATCH OUT

yacineMahdid commented 4 years ago

Here I should have done multiple issues instead of cramming everything in this notebook, I'll continue with the script/notebook and for next issue I'll version it a better.