Guide to Electroencephalography: From Raw EEG Data to Classification

Guide to Electroencephalography: From EEG Data to Classification

Electroencephalography (EEG) is a powerful non-invasive technique that allows researchers to study brain activity and cognitive processes. By recording electrical signals from the scalp, EEG provides valuable insights into brain function. The process of analyzing EEG data involves four essential steps: Preprocessing, Feature Extraction, Feature Selection, and Classification. Each step plays a crucial role in transforming raw EEG signals into meaningful information. In this article, we will explore these key steps and their significance in EEG research.

1. Preprocessing EEG Data

Before delving into analysis, raw EEG data must undergo preprocessing to remove noise, artifacts, and unwanted signals that may interfere with the results. Preprocessing techniques include filtering and noise removal to isolate specific frequency ranges of interest while eliminating unwanted frequencies (Niedermeyer & da Silva, 2005). Notch filters help remove power line interference and high-pass filters are used to reduce slow drifts in the signal.

Additionally, artifact rejection methods are employed to detect and remove artifacts caused by eye blinks, muscle movements, and other external factors. Referencing the EEG data to a common average or specific electrodes helps minimize spatial biases and ensures consistent interpretation.

2. Feature Extraction

Once the data is cleaned, relevant features are extracted from the EEG signals to capture essential brainwave patterns. Then, the power spectral density (PSD) estimates the power distribution across different frequency bands. This provides insights into the brain’s dominant frequency components during specific tasks or states (Niedermeyer & da Silva, 2005).

Time-frequency analysis, often using wavelet transforms, reveals changes in EEG power over time and across frequency bands, highlighting transient brain events and oscillatory responses. Event-related potentials (ERPs) are extracted by averaging EEG epochs time-locked to specific stimuli or events. This allows researchers to study brain responses related to cognitive and motor processes.

3. Feature Selection

With a wide range of extracted features, it is crucial to select the most informative ones for the classification task. Feature selection techniques include filter methods, which rank features based on their relevance to the classification task using statistical measures like Mutual Information, Chi-Square, or Correlation coefficients (Niedermeyer & da Silva, 2005).

Wrapper methods evaluate feature subsets by training and evaluating the classification model with different combinations of features. This leads to optimal feature subsets being computationally intensive. Embedded methods incorporate feature selection within the classification algorithm’s training process, penalizing less relevant features during model training.

4. Classification

The final step involves using machine learning algorithms to classify EEG patterns into different brain states or conditions. Support Vector Machines (SVM) are popular for EEG classification due to their ability to handle high-dimensional data and nonlinear relationships between features (Niedermeyer & da Silva, 2005).

k-Nearest Neighbors (k-NN) is a simple and intuitive classification approach. It assigns a class to a new sample based on the majority class among its k-nearest neighbors in the feature space. Artificial Neural Networks (ANNs), inspired by the brain’s neural structure, are powerful tools for EEG classification. They learn to recognize complex patterns in the data by adjusting the connection strengths between artificial neurons.


EEG data analysis has revolutionized neuroscience and our understanding of the brain. The four key steps of Preprocessing, Feature Extraction, Feature Selection, and Classification are essential in transforming raw EEG signals into meaningful information. Preprocessing ensures data quality, while feature extraction captures brainwave patterns. Feature selection focuses on the most informative aspects of the data, and classification allows us to decode brain activity and identify brain states.

As technology and machine learning continue to advance, EEG research holds even greater promise for unveiling the mysteries of the human mind. By combining expertise in neuroscience, data analysis, and machine learning, researchers can continue to push the boundaries of knowledge in this exciting field.

Explore the Enobio® wireless EEG system, which offers a straightforward approach for basic experiments while providing the potential for extensive research analysis.

References: Niedermeyer, E., & da Silva, F. L. (2005). Electroencephalography: Basic principles, clinical applications, and related fields. Lippincott Williams & Wilkins.