# Eyes closed and Open EEG data predict?

9 views (last 30 days)
I am having a resting state EEG data and want to predict the Eyes closed and open conditions. How can I implement code in matlab and any prototype code or function available to figure out this problem. Thanks!

Jingwei Too on 23 Jul 2020
(1) Extract the features from the EEG signals (for both eye closed and open)
(2) You may perform the prediction using the following toolbox by using the feature vector and label
Thanks Jingwei Too! Could you please guide me how to use the feature vector and label? I am having EEG data from several participants and I want to classify the resting state by extracting the alpha power of the EEG. For example, 10 participants and 38 channel data (10*38=380 ) means that 380 features in both resting states.
Dear Jingwei!
I had successfully applied your toolbox and it's working perfectly. At the frontal channel the accuracies are :
Classification Accuracy (KNN): 72.2546 %
Classification Accuracy (DA): 74.0612 %
Classification Accuracy (NB): 69.5661 %
Classification Accuracy (DT): 71.1095 %
Classification Accuracy (SVM): 70.1351 %
Classification Accuracy (RF): 68.2575 %
However I am bit confused and could you please eloborate these parameters in a bit detail.
(1) Accuracy for each fold in k-fold cross-validation
(2) Average accuracy over k-folds
(3) Confusion matrix.
Thanks once again for developing such an amazing toolbox for the Machine Learning applications.

Jingwei Too on 23 Jul 2020
Let say you have 10 participants, and 38 channels. You extract one feature (alpha power) from each participant. Then your feature vector will be 10 x 38 (Instances x features). However, if you extract two features from each participant. Then your feature vector will be 10 x 76. Hope this clear.
Then for the label, you have 10 participant, let say first 5 of them are eye closed and last 5 of them are eye opened. Then your label will be [1;1;1;1;1;0;0;0;0;0]. The '1' means eye closed and the '0' means eye opened. The '1' and '0' you can change them with any value, but just make sure they are different since they represent different conditions (eye closed or opened).
Thaks Jingwei! I already resolved the problem and it works perfectly. You really make ML so simple and hats off to you for this great contribution