Opening the book…
In this exercise, we’re going to look at another type of large, idiosyncratic voltage deflection that should be eliminated prior to the ICA decomposition, namely huge C.R.A.P. In particular, we want to get rid of voltage deflections that are sufficiently large to impact the quality of the ICA decomposition but are sufficiently infrequent or irregular in their scalp distribution that they can’t be well captured by a single IC.
The participant we’ve been working with so far, Subject 10, doesn’t really have any huge C.R.A.P., so we’re going to look at Subject 6 for this exercise. Reset everything with the Reset button, and then load the 6_MMN_preprocessed_filt_100Hz_del EEGset. This EEGset has already been preprocessed to improve the ICA decomposition, including filtering from 1-30 Hz, resampling at 100 Hz, and deletion of the break periods.
As usual, you should start by scrolling through the data to see what kinds of artifacts are present. In addition to the usual blinks and eye movements, you’ll see some odd-looking voltage deflections at several time points, including 70, 72, 96, 254, 403, and 413 seconds. These deflections are somewhat like blinks, but much larger and with a different and variable scalp distribution. For example, the deflection at ~70 seconds is present in Fp2 but not Fp1, and the deflection at ~72 seconds is huge in VEOG-lower and smaller at Fp1 and Fp2, with no polarity inversion. I have no idea what caused these deflections, but they’re large, rare, and have an inconsistent scalp distribution, so they’re likely to mess up the ICA decomposition.
To see this, let’s take a look at the ICA decomposition, which I did just as in the previous exercise (filtering from 1-30 Hz to minimize skin potentials and other slow drifts). Load the dataset I created with the decomposition (6_MMN_preprocessed_filt_100Hz_del_ICAweights) and then look at the ICs by clicking the Classify IC by ICLabel button in the EEGLAB ICA panel (and accepting the suggested parameters in the two small windows that appear). The IC maps are shown in Screenshot 9.18. (You can do the decomposition yourself if you’d like, but your maps might look a little different.)
Screenshot 9.18
The first thing you should notice is that many of the maps are irregular, even in the top half of the ICs (e.g., ICs 6, 7, and 14). That’s a strong hint that the decomposition did not work well. The next thing you should note is that IC 1 (which must account for a lot of variance, because it’s the first IC) is classified as Eye but only with a confidence of 85.9%. Its scalp map is somewhat like that of a typical blink, but it's larger over the right eye than over the left. Click on the 1 above the map for IC 1 to see its properties. The time course shows that it is strongly active during a few brief time periods and not at other times. Again, that’s unusual.
Now close the window for IC 1 and click on the 2 above the map for IC 2 to open a window showing its properties. This IC is classified as Eye with a confidence of 99.0%. It has the kind of scalp map we’d expect for blinks, and the time course contains the kind of distributed bursts that we’d expect for blinks. Note that the weights in the IC 2 scalp map are negative, whereas we saw positive weights at the frontal sites for blink-related ICs in our previous exercises. This is because the polarity of the IC maps is arbitrary, and a given IC may have either positive weights or negative weights. Just for fun, I repeated the decomposition a second time, and I found that IC 2 had positive weights in this repetition of the decomposition. The polarity of the weights in the maps is completely arbitrary, and the polarity of the activation values will also be reversed to come up with the right voltage polarity when we reconstruct the data. So, reversals of map polarity are not a problem.
To see this, select EEG channels 1, 2, and 29-33 and ICs 1-12 in the Channel and IC Selection panel, and turn on the plotting of ICs in the Plot Settings panel. If you scroll through the EEG voltages and IC activations, you’ll see that IC 2 has negative deflections at the times of blinks, whereas we saw positive deflections for the blink IC in our previous examples (e.g., Screenshot 9.4). If we multiply the negative activation values by the negative weights for the frontal sites, we’ll get a positive voltage at the frontal sites. So, it doesn’t matter if we have positive weights along with positive activations or negative weights along with negative activations. In either case, blinks will be reconstructed as a positive voltage at the frontal sites (but a negative voltage at VEOG-lower). So, IC 2 seems like it's doing a decent job of capturing blinks.
If you skip ahead to 70-75 seconds, you'll see two of the crazy artifacts that you saw earlier, one at about 70.5 seconds and the other at about 72 seconds. IC 2 exhibits a deflection for each of the artifacts. IC 1 also exhibits a large deflection for the first one but not for the second one. IC 3 exhibits a large deflection for the second one but not for the first one. So, you can see that IC 1 and IC 3 are very much influenced by these strange, idiosyncratic artifacts. That's a waste of ICs, and those artifacts violate ICA's assumption that all of the sources in the data have consistent scalp distributions over time. This can mess up everything.
Another thing you should notice in the IC maps is that there isn’t an IC with the scalp topography we’d expect for horizontal eye movements. There were many clear horizontal eye movements in the HEOG-bipolar channel when we scrolled through the data, but we haven’t captured these eye movements as a distinct IC in this decomposition. That also indicates that it didn’t work well. (Some participants don’t have many horizontal eye movements, and the lack of an IC for horizontal eye movements would not be a problem for those participants.)
Finally, you can see that the ICLabel algorithm had low confidence for many of the ICs. That can also indicate a poor decomposition.
Now let’s try to improve the decomposition by deleting the time periods with the huge C.R.A.P. artifacts. Make 6_MMN_preprocessed_filt_100Hz_del the active dataset and go to the Reject Artifactual Time Segments panel. This routine is like the moving window peak-to-peak amplitude routine for artifact detection that we used in the previous chapter, but with two differences. First, it operates on continuous EEG rather than epoched EEG. Second, it deletes sections of the data with artifacts rather than simply marking them.
Screenshot 9.19
Set up the top half of the panel as shown in Screenshot 9.19. We're using a threshold of 250; we don't want to reject blinks or other ordinary artifacts, so we need a higher threshold for this routine than we would use for normal artifact detection. 250 is a good starting threshold, but you may need to adjust it for some participants, especially those with extra-large blinks. Also, if you apply this routine to data that haven't been heavily filtered, you'll often need a higher threshold to avoid deleting a large portion of the data. We're using a moving window width of 1000 and a step size of 500; these parameters will cause the algorithm to look for 1000-ms time periods in which the peak-to-peak voltage exceeds the threshold, shifting the window in 500-ms increments. We don't want to flag trials with ordinary blinks or eye movements, so we'll exclude the EOG channels and tell it to use channels 1:31. (You might also want to exclude Fp1 and Fp2 if you have such large blinks in these channels that blinks end up exceeding the threshold for rejection.) Leave all the check boxes unchecked, and click the Preview button. I also recommend checking the box labeled Join artifactual segments separated by less than _____ ms (and putting 500 in the text box). This will avoid having brief periods of unrejected data between two nearby rejected periods.
In the window that appears, scroll through the data using the >> button until you are able to see the crazy artifact at 70.5, as shown in Screenshot 9.20. You can see that the time period around this artifact is marked in gray. This indicates that this section will be deleted. The section just after 72 seconds also looks a little weird, but only in the EOG channels, so it's good that this section isn't marked for deletion. If you keep scrolling, you will see that the time periods around the crazy artifacts at 96, 254, 403, and 413 seconds have also been marked for deletion.
Screenshot 9.20
To actually delete the marked segments, close the preview window, go back to the Reject Artifactual Time Segments panel, click the Finalize button, and name the resulting EEGset 6_MMN_preprocessed_filt_100Hz_del_car (where _car stands for "continuous artifact rejection"). If you look at the 5-second period starting at 68 seconds in the main eStudio window, you’ll see that the artifactual activity at ~70 seconds is gone and has been replaced with a boundary event, which has been inserted to mark the discontinuity in the data that was produced by deleting the segment from ~70-73 seconds.
When the EEG is recorded from highly cooperative participants using a high-quality EEG system (as was true in the ERP CORE experiments), many or most participants won't actually have any C.R.A.P. that exceeds the threshold for rejection in the continuous EEG data (especially when the data have been filtered from 1-30 Hz). But it's still worth running this routine, because you may have a few participants who will benefit. And if you're recording from less cooperative participants (e.g., kids) or using a noisier EEG system (e.g., dry electrodes), this step may help a lot.
Note that you can also manually reject sections with huge C.R.A.P. using the Manual rejection button in the Reject Artifactual Time Segments panel. It's usually faster and more easily scriptable to do the rejection automatically, but sometimes it’s useful to do it manually instead (or in addition). Just remember that your goal is to delete segments that will cause problems for ICA, not to delete segments with ordinary artifacts. That is, you want to delete segments with voltage deflections that are large, strange, and infrequent, especially if they have an inconsistent scalp distribution.
Now let’s see how deleting the huge C.R.A.P. has impacted the ICA decomposition. You can see the resulting decomposition by loading the EEGset named 6_MMN_preprocessed_filt_100Hz_del_car_ICAweights and then clicking the Classify IC by ICLabel button in the EEGLAB ICA panel (and accepting the suggested parameters in the two small windows that appear). The IC maps are shown in Screenshot 9.21.
Screenshot 9.21
The first thing to notice is that the scalp maps are more regular than those we obtained without deleting the huge C.R.A.P. (see Screenshot 9.18). There are still some irregular maps, but mainly in the bottom half, which don’t account for much variance (e.g., ICs 23 and 26). The second thing to notice is that IC 1 is now classified as Eye with 99.1% confidence and has the usual scalp map for a blink component. The third thing to notice is that we now have an IC with the usual scalp map for horizontal eye movements (IC 11). ICLabel's confidence is only 49.3%, but if you look at the time courses of the ICs and the EOG channels, you'll see that IC 13 matches the eye movements in the HEOG-bipolar channel quite well. So, by deleting segments with huge C.R.A.P., we've obtained a much better ICA decomposition, even though we only deleted ~10 seconds' worth of data.
Note that IC 11 is labeled Other, and it's narrowly focused over the FC4 electrode. I took a close look at this electrode in the original EEGset, and I saw a lot of odd behavior. I would consider interpolating this electrode (and therefore excluding it from the ICA decomposition).
The next steps are to transfer the ICA weights to the original EEGset (which you can find in a file named 6_MMN_preprocessed) and then remove ICs 1 and 11. You can do that or load 6_MMN_preprocessed_ICAweights_pruned.
Now scroll through the resulting dataset. You'll see that this EEGset still has data during the break periods at the beginning and end. If you scroll to 78 seconds, you'll see that the huge C.R.A.P. artifacts have not been deleted from this EEGset, but they are now at about 80 and 81.5 seconds. We will take care of these artifacts by using the artifact detection methods described in the preceding chapter to mark them (after epoching), and we'll exclude the marked epochs during the averaging process.
You should also notice that the artifact correction process has done a pretty good job of eliminating the voltages produced by blinks and eye movements. It hasn't taken care of all the other artifacts in this very noisy EEGset. But ICA is not designed to correct all artifacts, only those like blinks and eye movements that are large, frequent, and have consistent scalp distributions over time.
This page titled 9.6: Exercise- Deleting C.R.A.P. Prior to ICA was last modified on Thu, 01 Oct 2026 18:52:29 GMT and is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Steven J Luck directly on the LibreTexts platform.
The book could not be loaded just now.