National Economics University logo Faculty of Data Science and Artificial Intelligence logo BAI Lab logo

Topic 10

EEG Analysis with MNE Sample Dataset

Hard +1.5 Bonus Points
EEG Analysis with MNE Sample Dataset

Topic 10 โ€“ EEG Analysis with MNE Sample Dataset

Level: Hard Goal: Use EEG time series (one or a few channels) for analysis and simple modeling.

Library & Data

Installation

pip install mne

Data Loading

import mne
import pandas as pd
import numpy as np
data_path = mne.datasets.sample.data_path()
raw_fname = data_path + "/MEG/sample/sample_audvis_raw.fif"
raw = mne.io.read_raw_fif(raw_fname, preload=True)
raw.pick_types(meg=False, eeg=True)
data, times = raw[:1, :]  # first EEG channel
sr = raw.info["sfreq"]
index = pd.to_datetime(times, unit="s")
eeg_series = pd.Series(np.ravel(data), index=index)

Implementation Steps

1. Library Setup and Data Loading

2. Data Exploration

3. Data Preprocessing

4. Feature Extraction

5. Exploratory Data Analysis (EDA)

6. Model Building

7. Model Evaluation

8. Neurophysiological Interpretation

Expected Deliverables

  1. EDA Report:
  1. Model Results:
  1. Code:

Tips

Starter Notebook

The starter notebook contains installation instructions and data loading code to help you get started with this topic.

๐Ÿ““ View Starter Notebook on GitHub

Note: You can view the notebook directly on GitHub or download it to run locally in Jupyter.

Getting Started

This topic includes:

Navigate to the Topic/10.EEG_MNE/ directory to access all resources.

โ† Back to All Topics