Documentation Index
Fetch the complete documentation index at: https://docs.nimbusbci.com/llms.txt
Use this file to discover all available pages before exploring further.
Python SDK
The nimbus-bci Python library provides sklearn-compatible Bayesian classifiers for Brain-Computer Interface applications. It delivers local probabilistic inference with uncertainty quantification, streaming support, and rich diagnostics. The optionalNimbusSoftmax model uses JAX and is available with pip install nimbus-bci[softmax].
Start Here
Install nimbus-bci
Install and verify your Python SDK environment.
Run Quickstart
Build your first Bayesian BCI classifier in minutes.
Pick a Model
Compare NimbusLDA, NimbusQDA, NimbusSoftmax, and NimbusSTS.
Overview
nimbus-bci is a production-ready Python package available on PyPI that brings Bayesian inference to BCI applications with a familiar sklearn-compatible API.
New in
nimbus-bci 0.4.1: active-learning helpers for label-efficient calibration, including suggest_next_trial(), should_query(), and calibration_sufficient(). See Active Learning.Key Features
sklearn Compatible
Drop-in replacement for sklearn classifiers. Works with pipelines, cross-validation, and GridSearchCV.
Streaming Inference
Real-time chunk-by-chunk processing for online BCI applications with weighted aggregation.
MNE Integration
Seamless integration with MNE-Python for EEG preprocessing and feature extraction.
Rich Diagnostics
Entropy, calibration metrics (ECE/MCE), ITR calculation, and quality assessment.
Online Learning
Update models incrementally with
partial_fit() without retraining from scratch.Active Learning
Rank unlabeled trials, request labels only when useful, and stop calibration when the posterior stabilizes.
Fully Local
No API keys required. All processing happens on your machine for maximum privacy.
Quick Example
Available Classifiers
The Python SDK provides four Bayesian classifiers:| Classifier | Description | Best For |
|---|---|---|
| NimbusLDA | Bayesian LDA with shared covariance | Fast, well-separated classes (motor imagery) |
| NimbusQDA | Bayesian QDA with class-specific covariances | Complex distributions (P300) |
| NimbusSoftmax | Bayesian logistic regression (Polya-Gamma VI) | Non-Gaussian decision boundaries |
| NimbusSTS | Bayesian Structural Time Series (Extended Kalman Filter) | Non-stationary data, long sessions |
- 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:| Feature | Python SDK | Julia SDK |
|---|---|---|
| Installation | pip install nimbus-bci | Pkg.add("NimbusSDK") + API key |
| API Style | sklearn-compatible classes | Functional + types |
| Integration | sklearn pipelines, MNE-Python | RxInfer.jl ecosystem |
| Performance | Fast local Python implementation; optional JAX Softmax | Fastest (native Julia) |
| API Key | Not required | Required |
| Use Case | Production ML pipelines | Research, custom models |
| License | Proprietary (free evaluation) | Commercial tiers |
When to Use Python SDK
Choose the Python SDK if you:✅ Work primarily in Python
✅ Use sklearn pipelines and MNE-Python
✅ Want immediate installation without API keys
✅ Need sklearn-compatible API for easy integration
✅ Prefer fully local processing
When to Use Julia SDK
Choose the Julia SDK if you:✅ Need maximum performance (native Julia)
✅ Want to build custom Bayesian models
✅ Work with RxInfer.jl ecosystem
✅ Need pre-trained model distribution
✅ Require enterprise support
Architecture
- Local Processing: All computation happens on your machine
- Privacy First: Your EEG data never leaves your computer
- sklearn Compatible: Works with existing ML workflows
- Fast Inference: Efficient local inference, with optional JAX support for
NimbusSoftmax - Uncertainty Aware: Full Bayesian posterior distributions
Use Cases
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
Research Pipelines
sklearn-compatible API for reproducible BCI research
What’s Included
Thenimbus-bci package provides:
Classifiers:
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
suggest_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
Next Read
Installation
Install nimbus-bci and verify your setup
Quickstart
Build your first BCI classifier in 5 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
Need help? We’re here for you:- Email: hello@nimbusbci.com
- Documentation: Browse our comprehensive guides
- GitHub: github.com/nimbusbci/nimbuspysdk
- Examples: Check out working code samples in the package
Ready to get started? Head to the Installation Guide to install nimbus-bci.