# Research: EEG and brain-computer interfaces

> Pratham Shah’s brain-computer interface research on the NeuroArm team: EEG preprocessing, band-power features, and Random Forest and MLP classification.

Canonical: https://pshah.fun/research
Last updated: 2026-10-23

From July 2024 to May 2025 I was part of the team building NeuroArm, a brain-computer interface for controlling a prosthetic arm with EEG. I worked on the signal side: getting from raw brain activity to a movement decision someone can see and check.

## The pipeline

EEG is microvolt-level, noisy and different for every person. Each stage exists to throw away something that isn’t intent.

### Signal path

From headset to actuator, as modelled in the NeuroArm web app.

1. EEG capture (`multi-channel headset, e.g. AF3 … AF4`)
2. Preprocess (`filtering, standardization`)
3. Features (`band power: delta, theta, alpha, beta, gamma`)
4. Classify (`Random Forest / MLP`)
5. Intent (`left vs right`)
6. Arm command (`visualized in the web app`)

- **Preprocessing**: A filtering stage in the NeuroArm app, then standardization (StandardScaler) so electrodes and bands with larger raw values don't dominate the model.
- **Feature extraction**: Band power per electrode: delta (0.5–4 Hz), theta (4–8), alpha (8–13), beta (13–30) and gamma (30–50), summarized as mean and standard deviation.
- **Classification**: A 100-tree Random Forest as the baseline and a two-layer MLP (128 → 64, dropout 0.3, early stopping) as the neural alternative.
- **Visualization**: A web app that walks through upload, signal view, filtering, features, training and results, so the pipeline can be inspected rather than trusted blindly.

## Results in the public notebooks

**91.6%** Random Forest test accuracy, macro F1 0.92.

Measured on 2,563 held-out samples from a 12,811-sample, 14-feature EEG dataset with a binary label (80/20 split). Per class: precision 0.96 and recall 0.87 for class 0; precision 0.88 and recall 0.96 for class 1.

These are within-dataset numbers from a random split. They don’t show how the model transfers to a new person; cross-subject validation is the honest next test.

[See the notebooks on GitHub](https://github.com/pshah-lab/BCI). NeuroArm was a team project, and the public repositories are forks of the team’s.

## Related

- [NeuroArm case study](https://pshah.fun/projects/neuroarm)
- [Open the NeuroArm app](https://neuro-arm.vercel.app/)
