BrainState decisions.
Overview
MNE-Python handles:- Loading EEG data from various formats
- Preprocessing (filtering, artifact removal)
- Epoching and event extraction
- Feature extraction (CSP, bandpower)
- Bayesian personalization (
Personalizer) and standalone heads - Uncertainty quantification and gating (
BrainState) - Online learning
- Real-time inference
- Heads:
NimbusLDA,NimbusQDA,NimbusSoftmax,NimbusSTS
Installation
Install both packages:nimbus-bci- Bayesian personalization + headsmne≥ 1.6 - EEG preprocessing
Product path: epochs → encoder → Personalizer
Use MNE for acquisition / epoching, then hand trial tensors to a frozen trunk:wrap_eegnet, wrap_braindecode — see Personalizer & Middleware.
Classical path: CSP → Personalizer / head
1. Load and Preprocess with MNE
2. Extract Features
3. Personalize (or fit a head)
Complete Motor Imagery Pipeline (classical)
Optional Riemannian Feature Pipeline
For workflows that use covariance geometry, install the pyRiemann extra and build a sklearn pipeline from EEG epochs to a Nimbus head (then optional Personalizer on the resulting features):This factory delegates covariance and tangent-space transforms to pyRiemann, then feeds the resulting feature rows into a Nimbus head. It is a composition helper, not a new Riemannian Bayesian model family.
CSP Feature Extraction
Basic CSP
Custom CSP Parameters
Multi-Class CSP
For more than 2 classes:Bandpower Features
Extract Bandpower
Output Shape
P300 ERP Features
Extract ERP Amplitudes
Convert Between Formats
MNE Epochs to BCIData
BCIData to MNE Epochs
Complete BCI Pipeline
Create end-to-end pipeline:Real-Time BCI with MNE
Online Processing
Cross-Session Transfer
Handle different sessions with normalization:Advanced Preprocessing
ICA for Artifact Removal
Automated Artifact Rejection
Visualization
Plot CSP Patterns
Plot Classification Results
Best Practices
1. Consistent Preprocessing
Apply same preprocessing to all data:2. Save Preprocessing Objects
Save CSP and normalization for later use:3. Validate Data Quality
Check data quality before training:Next Read
Personalizer & Middleware
Encoder contract and BrainState
sklearn Integration
CV / GridSearch on heads
Streaming Inference
Real-time BCI with chunk processing
API Reference
Complete API documentation