Skip to main content

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.

Why Bayesian BCI Inference

BCI systems are not just classifiers. They are decision systems that must work under noise, adapt during sessions, and expose confidence before closing the control loop. Classical machine learning methods each solve part of that problem — but they trade away uncertainty, online updates, or transparency in ways that matter in production BCI. This page compares common BCI processing approaches and explains where Bayesian inference on NimbusSDK fits. For a deeper comparison with scikit-learn and pyRiemann — including benchmark methodology — see Why Nimbus SDK? Beyond scikit-learn and pyRiemann for BCI.

How BCI Processing Methods Compare

The table below compares classical / frequentist approaches with Bayesian inference on NimbusSDK. Nimbus ships Bayesian versions of LDA and QDA (NimbusLDA, NimbusQDA); the contrast is about inference philosophy and BCI workflow support, not the Gaussian model family itself.
CriterionLDASVMDLNimbus
Real-time performanceHigh — very fast on simple linear problemsMedium — slower with complex kernelsLow — often GPU-bound; many pipelines stay offlineHigh (reactive) — streaming APIs and incremental updates; 10–25 ms per trial
AdaptabilityLow — static model; full retrain for new dataMedium — adaptation is possible but awkwardMedium — needs large new datasets and retrainingHigh (by design)partial_fit() on every head; NimbusSTS for drift
Robustness (to noise)Low — sensitive to outliers and noisy covariancesMedium — more robust than LDA, still point-estimateMedium — can learn noise patterns but needs vast dataHigh (explicit modeling) — Student’s t posterior predictive and uncertainty-aware rejection
InterpretabilityHigh — linear boundaries and clear feature geometryMedium–low — opaque with non-linear kernelsVery low — black-box decisionsVery high — full posteriors, factor graphs, entropy, and calibration diagnostics
Online updateLow — refit each round (~835 µs sklearn LDA)Low — no native partial_fitLow — retrain or fine-tune; not microsecond-scale~10× faster — conjugate partial_fit() (~87 µs vs. sklearn refit)
DL = deep learning.
Classical LDA and NimbusLDA share the same Gaussian model family. The difference is inference: plug-in MLE probabilities vs. multivariate Student’s t posterior predictives, conjugate online updates, and BCI-native reports. See Probabilistic AI & Uncertainty for how those outputs drive rejection and control.

When classical methods are enough

Classical LDA, SVM, or deep learning can be the right choice when:
  • You need a quick offline baseline on a fixed, clean dataset.
  • You will not gate actions on confidence, entropy, or rejection thresholds.
  • Calibration data is abundant and sessions are short and stationary.
  • You are comparing accuracy tables in a lab setting, not closing a real-time BCI loop.

When Bayesian inference on NimbusSDK helps

Nimbus is designed for deployments where the question is not only what class? but also how certain, should this trial be accepted, and how does that affect ITR?
  • Streaming controlStreamingSession and chunk-validated metadata for live EEG loops.
  • Session driftpartial_fit() without full retrain; NimbusSTS for latent-state adaptation.
  • Label-efficient calibration — active learning with honest BALD on Bayesian posteriors.
  • Safety and auditability — confidence gates, trial quality checks, and structured BatchResult diagnostics.

~10× Faster Online Updates

The Online update row above is benchmarked on Nimbus’s checked-in online-update scenario (BNCI 2014-004, with Zhou 2016 as a supporting replication):
StrategyLatencyNotes
nimbus_partial_fit~87 µsConjugate online update
nimbus_refit~145 µsFull Nimbus refit
sklearn_refit~835 µssklearn LDA refit each round
Result: sklearn_refit / nimbus_partial_fit9.7× on average across subjects (~7.5×–10.2× per subject on the published run) — effectively ~10× faster online adaptation. Medians: ~83 µs vs. ~827 µs.
Reproduce these numbers from the checked-in benchmark CSV via notebooks/s3_update_latency_head_vs_sklearn.ipynb. Full context, plots, and the sklearn / pyRiemann workflow comparison are in the blog post.
This latency advantage compounds in cued-calibration loops: faster updates mean shorter sessions, more trials accepted per minute, and smoother real-time feedback without blocking the EEG stream.

Composing With Other Tools

Nimbus is a decision layer, not a replacement for every ML or geometry library.
ToolRole
scikit-learnOffline baselines and frequentist comparisons
pyRiemannCovariance geometry and tangent-space features
NimbusSDKBayesian heads, streaming, posteriors, and BCI diagnostics
Typical composition:
EEG → CSP / bandpower / pyRiemann tangent vectors → NimbusLDA or NimbusQDA → confidence-aware action
Use pyRiemann (or CSP) for representation; use Nimbus for inference and BCI reports when uncertainty and online updates matter.

Picking a Nimbus Model

Once you choose Bayesian inference, select the head that matches your signal geometry and session length:
ModelBest for
NimbusLDAFast baseline, well-separated classes, motor imagery
NimbusQDAOverlapping class distributions, P300-style ERPs
NimbusSoftmaxNon-Gaussian multiclass boundaries (Python)
NimbusProbitJulia-native multinomial probit workflows
NimbusSTSNon-stationary sessions, latent-state drift (Python)
See Model Specification for the full side-by-side comparison.

Next Read

Probabilistic AI & Uncertainty

Posteriors, confidence scores, and rejection thresholds.

Message Passing Architecture

Why reactive inference beats batch recompute in streaming BCI.

Active Learning

BALD ranking and label-efficient calibration loops.

sklearn Integration

Benchmark Nimbus against sklearn LDA, SVM, and random forest in code.