EEG Pattern Detection Software
← Project Index EEG Pattern Detection Software

EEG Pattern Detection Software

The offline analysis half of the MindWave work -; tools that chew through recorded brainwave data in SQL or CSV looking for relationships between frequency bands and what you were actually doing, via clustering, correlation, and temporal pattern detection.

Archived Started: Summer 2025 Updated: Summer 2025

Overview

Where the MCP server and adaptive-interface work are about live brain state, this is the patient, after-the-fact half: a kit of Python analysis tools that loads sessions from a SQL Server database or CSV and hunts for structure -; which band combinations cluster together, which correlate with which activity, and how patterns evolve over the length of a session.

The motivating dataset was wonderfully mundane: brainwaves recorded while playing Monopoly, used to ask whether you could spot "strategic thinking" states in the signal.

Background

Once there were stacks of recorded CSVs (and a SQL Server database, mind, with sensor and session tables), the natural question was whether different activities leave distinct brainwave "fingerprints". That turned into a fairly serious analysis stack -; and, because the data got big, eventually a GPU-accelerated hierarchical analyzer to keep the heavier algorithms tractable.

How It Works

At the core is a pattern analyzer that works across the eight bands (Delta, Theta, Alpha1/2, Beta1/2, Gamma1/2) using a familiar scikit-learn toolbox:

  • Clustering -; KMeans and DBSCAN to find natural groupings of brain states without labels; PCA and t-SNE to make the high-dimensional band space visible.
  • Correlation & classification -; correlation analysis between bands and activities, plus Random Forest classifiers (with cross-validation) to test whether an activity is predictable from the signal.
  • Temporal patterns -; peak-finding and time-series analysis to catch how states shift across a session rather than treating each sample as independent.
  • Storage layer -; loads equally from CSV or a SQL Server connection, and writes discovered patterns and activity fingerprints back out.

A separate, more exotic module reaches for the heavier neuroscience methods -; phase-amplitude coupling, entropy measures, microstate and functional-connectivity analysis -; to look for cognitive-state signatures the basic stats would miss.

Where It Landed

Archived as a working analysis suite. It ran end to end -; there are exported activity fingerprints and analysis results in the repo -; with a master pipeline that processes all sessions and emits an HTML report. The honest caveat is the data: single-sensor consumer EEG with lots of artifacts, so "fingerprints" are suggestive, not conclusive.

  • Clustering, correlation, classification, and temporal analysis over recorded sessions.
  • CSV and SQL Server ingestion; exported fingerprints and a master HTML report.
  • Optional GPU-accelerated path for the larger datasets and heavier algorithms.