Functional Connectivity of Epileptic Brains: Preprocessing EEG Data - Week 2 Update

Published: 11/15/2017  

Last Updated: 11/14/2017

EEG data can be recorded with many different file types depending on the instrument and the institution.  The file type in this research that we will be working with is the simple text file containing EEG data.

The first thing after we import our EEG data is to apply preprocessing techniques to the data. This way we can ensure that we only keep the important information from the neural activity rather than the information generated from artifacts. The most common artifacts presented in EEG data are eye blinks and 60Hz power line interference as shown in figure below.

To detect the 60Hz power line interference, the most intuitive way is to generate the spectrogram of the signal and detect the peak in 60Hz frequency component of the plot. The simplest way to remove this artifact is to apply the notch filter removing the 60Hz frequency component of the EEG signal.

The detection of eye blinks are more difficult. The way to identify eye blink patterns from the EEG data requires experience and an advice from experts. The simple way to detect eye blinks are to match the time stamp of the video recording of the patient to the EEG data. To remove eye blink artifact, we will apply Independent Component Analysis (ICA) to the data. The ICA technique attempt to un-mix the data according to its sources.

Image source:

After applying ICA to the data that we import, we can generate plots for each of the ICA components from the EEG data as shown in the figure below. From the plot, we can select the components that we want to remove from the EEG data and zero out the components that we wish to remove. In this case, we will remove components number #IC17 and #IC18 from the data where we think that these components are artifacts. Then we reconstruct the cleaned EEG data from the remaining ICA components.

Figures below show the difference between original EEG data (left side) and the data that we applied preprocessing techniques to it (right side). We can see that the artifacts were removed and now the data is ready for our next steps.

Read Previous: Investigating Connectivity of Epileptic Brain - Week 1 Update

Continue to: Extracting Functional Connectivity - Week 3 Update

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at