EEG epoch elimination with machine learning algorithm

Hello everyone,
I need to do a project related to EEG epoch elimination with a machine learning algorithm. Is there anyone who can help me or give me some link that may be helpful for me?
I will record some eeg signal and will extract epochs, a combination of good and bad epochs. From those, I need to differentiate or select good epochs /or identify and remove bad epochs. This should be done by machine learning. I am not sure how to start as I have not enough knowledge about machine learning.
My email is: [email protected]



  • wjcroftwjcroft Mount Shasta, CA

    Rafia, is this a BCI application? What does the subject see/hear, and what are good / bad trials? Are you recording external trigger events in the EEG data stream?


  • @wjcroft
    Yes. It is a BCI application. The subject's mind will be distracted with some distractions. Like, music, video, etc. Then will record EEG signal and will extract ERP epochs. There some will be good, some won't. I want to detect good epochs and eliminate other bad ones. Then, those good epochs will be used for further analysis. This detection process wants to perform by the machine learning algorithm.

  • @wjcroft
    Yes, I am recording external trigger events in the EEG data stream.

  • wjcroftwjcroft Mount Shasta, CA
    edited May 29

    For any classifier to be constructed, you need to 'train' it with known good/bad (or in P300, oddball vs non-oddball) epochs. From your description in the last couple comments, this does NOT sound like an oddball P300 paradigm. Yet your other thread link above, does ask "Which is best ML algorithm for auditory oddball". This distracted vs non-distracted does not seem to be able to generate P300 oddball response.

    Instead, you will somehow determine during your experimental presentation and sampling, whether this is an epoch that is 'distracted' or 'not-distracted'. There are classifiers that can register if the subject is focused vs non-focused. Brainflow now has one. Might be worth experimenting with:

    There are likely 'many' papers that you can examine regarding ML / DL detection of 'states'. See the research review survey papers at the link,

  • @wjcroft
    yes, I need to classify distracted or focused epochs and select only good epochs from one recording. Please see the attached figure.

  • It seems in the data above that the bad epochs have an extra peak between start and the point where all epochs have a peak. This could be used as a feature in a random forest machine learning classifier. Look for values above a threshold to find the peaks.

  • @Billh
    You are right. But I am not very good at coding. can you please help me ? My email: [email protected]

Sign In or Register to comment.