Hey guys, in this video
I'm basically going to continue my last
EEG video about artifact removal using ICA. In the last video, I talked about
artifact removal--the basics of it and how to remove
components manually in EEGLAB.
In this video,
I'm going to continue that idea and talk about guided removal of artifacts or
semi-automated removal of artifacts using ICA.
There are a couple of
algorithms that are saved as plugins in EEGLAB that you can use as like a guide for which
components to mark for rejection for artifact removal. If you go to
MATLAB and open up EEGLAB.
If you go down here to manage EEGLAB extensions and then click data processing extensions,
you'll find a list of plugins for EEGLAB that you can download.
And once you download this if you go to the folder that has EEGLAB,
there should be a folder called plugins and then you'll find the folders for these separate plugins once you download them.
I have downloaded a couple already and I have--they're probably even more that I haven't tested--but some
semi-guided artifact removal ones for ICA include this one called SASICA,
Adjust, and MARA.
I have them downloaded already and these are already plugins that I can use in EEGLAB.
If you haven't downloaded them,
you can click--they'll be up here then--you click
to install and then you click OK and it will download it and put it in the plugin folder.
Once that's done, you can use the plugins in EEGLAB.
If you go to tools, I already have SASICA.
I have Adjust and I have MARA.
The ones that I found were basically three different algorithms for like guided artifact removal.
There was Adjust, there's MARA, and then SASICA has another one called FASTER, I believe.
SASICA has FASTER and it also has a--it will also show you the results for Adjust--and MARA is separate.
I have a dataset already loaded in and I already ran ICA on this dataset.
This is with the individual components already
registered and this is for 23 electrodes so I have 23 components.
Let me run SAS because it runs the Adjust and the FASTER algorithms.
Once you click SASICA, it will open this.
This has some parameters that you can specify. For me,
my data has a vertical eye channel for blinks and a horizontal one for saccades
and so I click that I want correlation with the EOG channels and I label them.
If you type in 1 that will change to EOG. If I type in 2 that will change to the horizontal channel.
My channels have already been labeled this way.
These are just some parameters that you can pick yourself. The two algorithms
that you can run in SASICA are Adjust and FASTER
like I said before. And then this cuts off my computer screen, but there's--below this cutoff,
there is a button that says compute. I'm going to click that button.
I can't really show you but it's there and I'm going to click compute.
If I go to my MATLAB window that's going to run. The results will pop up as well.
It's computing now some topography maps and these are the results.
Similar to the window that I showed you in the previous video to remove the components,
these are the 23 individual components output from
when we ran ICA and now by running SASICA
it gives you suggestions on which individual components to reject. You don't have to go through them all
manually, or you don't have to decide completely by yourself. This gives you basically some suggestions.
I don't really know what this is or
I don't really pay attention to that window, by the way.
But now when you click one of the individual
components, it will again show you these maps which it showed you before. And this does look like an eye blink based on the ERP image.
And it includes these extra plots down here.
This gives you the plot for the output from Adjust and this is the FASTER algorithm. And you can look into the
documentation for each of these plugins or algorithms to see what they're doing. I believe this one is originally in French.
These acronyms are actually based on like French words, I believe. And anyway, these basically will have a threshold.
This is one threshold,
and this is two times a threshold, and basically if any of these components cross the dotted line then that suggests that the
component might be artifact. And it kind of takes into consideration--
I think I read over the documentation that says it takes into consideration
the relative amounts of how far past or below the threshold is for each of these components.
If you have one component that just barely passes the threshold for one
but maybe it doesn't for the other three categories that it looks for, then it won't necessarily
mark the component for rejection. It kind of takes into consideration
these four--or no, actually five categories. And so here you can see that this is the
category marked for rejection for Adjust and then this is FASTER.
And then again, it's kind of hard to show you on this window, but there's a button here--
I think it's just cut off, that says reject so you can either accept it or
reject it. Kind of the same as the button before basically and so if you click reject
the button will turn red
and then once you're done with this, then you can go back into EEGLAB and remove the components.
That's just marking them for rejection. You're not actually removing them yet.
And so that just gives you kind of some
suggestions in case you're new to artifact removal using ICA
or if you just want to kind of double-check with an algorithm that you're doing it correctly. And now let me show you the MARA
algorithm because it's a little bit different and the output is a little bit different as well.
And I'm going to skip showing you the Adjust. If you just want to run the Adjust algorithm,
it's basically the same thing.
SASICA has both the Adjust and the FASTER algorithms so I can just skip showing you the Adjust. I'm going to
click MARA classification. We already did these pre-processing steps. I'm not going to click either of these up here.
I'm going to say that after you run the MARA algorithm to plot and select components for removal.
That's going to run in the terminal window or the command window. And since I already marked some
components for rejection before, I'm going to click to overwrite old labels.
And so this is the MARA output once it's done.
This gives me the 23 channels in two different windows or the 23 different components.
It similarly suggests which components to mark. You can run all these separate algorithms and then compare them as well.
What I like about this output is it gives you the artifact probability.
This one says, for example, that component 1 which were marked in pretty much all of the algorithms,
this has a 100% chance of being artifact. Here, it's still 100. Here it's 70 percent. It's not marked.
Here, it's 99%.
You can just--I like these this output because it gives you a percentage and it gives you these similar graphs
to the other ones as well.
The checkmarks here will suggest again to remove these
artifacts or components. And then you again just remove the components by going to tools > remove components. And it will give you the
suggested list from the previous windows that you were looking at. That was just a quick follow-up to my previous video and
thank you guys for watching!
*chiptune music*