Signals & Datasets
What real PiEEG-8 recordings look like, open data to practise with, and a first machine-learning project.
Example signals
EEG: alpha rhythm
Eyes closed, the alpha rhythm (8–13 Hz) over the back of the head grows. Each "Closed" period below shows a clear rise in amplitude.

EEG: artifacts
Chewing and blinking leave large, sharp signals in the EEG. These come from muscles and eye movement, not the brain. The wavelet view (bottom) shows how they spread across frequencies.

Learn to recognise artifacts before you analyse anything. Remove or mark them before computing band power or training a model.
EMG: muscle activity
Bursts of activity as the muscle contracts and relaxes.

ECG: heart activity
Each sharp peak is one heartbeat (the QRS complex).

Datasets
All datasets are in the PiEEG-8 repository (opens in a new tab).
| Dataset | Content | Format |
|---|---|---|
Datasets/dataset.xlsx (opens in a new tab) | Raw EEG, dry Ag/AgCl electrodes without gel, 10-20 positions, 250 SPS | Excel, µV |
1.GUI/dataset/ (opens in a new tab) | Raw EEG with chewing (4-3-2-1 times) and blinking (4-3-2-1 times), 250 SPS | Excel, µV |
2.Software/Dataset/eeg_data_3.txt (opens in a new tab) | Raw 27-byte frames from the PiEEG app | Text |
Each dataset folder has a plotting script, for example 1.data_graph_visualization.py and 2.Alpha_plot.py.
Machine learning: stress detection
A complete beginner pipeline in ML_application (opens in a new tab): record, turn raw EEG into alpha power, then train a classifier.
| Step | Script | What it does |
|---|---|---|
| 1. Collect | 1.save_data_short_Pi5.py | Record raw EEG to Excel. Aim for about 50 recordings of 1 minute or more for each condition (for example, stress and no stress). |
| 2. Extract features | 2.Convert_to_Power_Alpha.py | Convert raw EEG to alpha-band power, which is more informative for stress than raw voltage. Remove recordings with strong artifacts first. |
| 3. Prepare | Combine the recordings into one file per condition, and add a column with the recording (or subject) number. | |
| 4. Train | 3.ML.py | Train and test a classifier on the two conditions. |
Full walkthrough: How to use machine learning for stress control via EEG (opens in a new tab).
This is a learning example. A classifier trained on a few recordings is not a validated measure of stress, emotion or health.