encode(X) → Z, adapt online with Personalizer, and ship apps on BrainState. Optional extras add NimbusSoftmax via JAX (pip install nimbus-bci[softmax]) and pyRiemann feature pipelines (pip install nimbus-bci[riemann]).
Start here
Install nimbus-bci
Install and verify your Python SDK environment.
Personalizer & Middleware
Encoder contract, BrainState, and decision presets.
Run Quickstart
Fit your first Personalizer in minutes.
Overview
nimbus-bci is a production-ready Python package on PyPI. The product surface is middleware; the Bayesian heads (NimbusLDA, …) power Personalizer and remain usable standalone.
Product wedge:
wrap → Personalizer → BrainState. Also: CalibrationSession for active learning, and nimbus_bci.riemann.make_riemann_nimbus_pipeline(...) for pyRiemann + Nimbus heads. See Personalizer & Middleware and Active Learning.Key features
Personalizer Middleware
Plug any frozen trunk; personalize online; ship
BrainState to apps.sklearn Compatible Heads
Bayesian heads work as drop-in sklearn classifiers in pipelines and CV.
Streaming Inference
Real-time chunk-by-chunk processing with optional BrainState bridges.
MNE Integration
Works with MNE-Python for EEG preprocessing and feature extraction.
Riemannian Features
Optional pyRiemann covariance/tangent feature pipelines feeding Nimbus heads.
Rich Diagnostics
Entropy, calibration metrics (ECE/MCE), ITR calculation, and quality assessment.
Online Learning
Update heads incrementally with
partial_fit() without retraining from scratch.Active Learning
Rank unlabeled trials, request labels only when useful, and stop when the posterior stabilizes.
Fully Local
No API keys required. All processing happens on your machine.
Quick Example
Available Heads
The Python SDK provides four Bayesian heads (used byPersonalizer(head=...) or standalone):
All heads provide:
- Full posterior distributions
- Uncertainty quantification
- Online learning via
partial_fit() - sklearn-compatible API
propagate_state(), get_latent_state(), set_latent_state()) for temporal adaptation.
Python vs Julia SDK
Both SDKs implement the same Bayesian models but with different design philosophies:When to use the Python SDK
Choose the Python SDK if you:- Work primarily in Python
- Use sklearn pipelines and MNE-Python
- Want installation without API keys
- Need a sklearn-compatible API
- Prefer fully local processing
When to use the Julia SDK
Choose the Julia SDK if you:- Need native Julia performance
- Want to build custom Bayesian models
- Work with the RxInfer.jl ecosystem
- Need pre-trained model distribution
- Require enterprise support
Architecture
Product path:- Encoder contract: Nimbus does not own DL architectures — integrators supply embeddings
- App surface:
BrainStatefor devices;BatchResultfor research diagnostics - Local Processing: All computation happens on your machine
- Privacy First: Your EEG data never leaves your computer
- sklearn Compatible: Heads work with existing ML workflows
- Uncertainty Aware: Full Bayesian posterior distributions
Use cases
Frozen Encoder Personalization
Plug EEGNet / BrainDecode / partner trunks into Personalizer
Motor Imagery BCI
Control devices with imagined movements using CSP features and NimbusLDA
P300 Speller
Communication interfaces using ERP features and NimbusQDA
Real-time Neurofeedback
Streaming inference for live brain state monitoring
What’s Included
Thenimbus-bci package provides:
Middleware (product surface):
Personalizer- Bayesian personalization head over a frozen encoderwrap/FrozenEncoder/EncoderProtocol- encoder contractBrainState/Prediction/IntentHypothesis- app contractsdecide/brain_states_from_batch/brain_state_from_streaming_result- bridgeswrap_eegnet/wrap_braindecode- optional named adapters
NimbusLDA- Bayesian Linear Discriminant AnalysisNimbusQDA- Bayesian Quadratic Discriminant AnalysisNimbusSoftmax- Bayesian Multinomial Logistic RegressionNimbusSTS- Bayesian Structural Time Series (Extended Kalman Filter)
BCIData- Container for features, metadata, labelsBCIMetadata- Metadata for BCI experiments
predict_batch()- Batch inference with diagnosticsStreamingSession- Real-time chunk processing
CalibrationSession- Manage pool-based calibration rounds and stopping snapshotssuggest_next_trial()- Rank unlabeled feature pools by informativenessshould_query()- Decide whether an arriving trial is worth labelingcalibration_sufficient()- Stop calibration when the posterior stabilizes
compute_entropy()- Prediction uncertaintycompute_calibration_metrics()- ECE/MCEcalculate_itr()- Information Transfer Rateassess_trial_quality()- Quality checks
estimate_normalization_params()- Feature normalizationdiagnose_preprocessing()- Preprocessing diagnosticscompute_fisher_score()- Feature discriminability
from_mne_epochs()- Convert MNE Epochs to BCIDataextract_csp_features()- CSP feature extractionextract_bandpower_features()- Bandpower features
make_riemann_nimbus_pipeline()- Build an EEG-epoch pipeline from pyRiemann covariance/tangent transforms to a Nimbus classifier head
Next read
Installation
Install nimbus-bci and verify your setup
Personalizer & Middleware
Encoder contract and BrainState
Quickstart
Fit your first Personalizer in minutes
API Reference
Complete API documentation with examples
Active Learning
Reduce calibration time with label-efficient trial selection
MNE Integration
Use nimbus-bci with MNE-Python
Support
- Email: hello@nimbusbci.com
- GitHub: github.com/nimbusbci/nimbuspysdk
Ready to get started? Head to the Installation Guide.