Skip to main content

NimbusSoftmax — Bayesian Softmax Classifier

Python: NimbusSoftmax | Julia equivalent: NimbusProbit
Mathematical model: Bayesian multinomial logistic regression with Polya-Gamma variational inference
NimbusSoftmax is the Python SDK’s flexible non-Gaussian static classifier. Use it when NimbusLDA and NimbusQDA are too restrictive, but you still want posterior uncertainty, sklearn compatibility, and active-learning support.
Python Personalizer head: use as Personalizer(head="softmax") (requires pip install nimbus-bci[softmax]), or standalone as NimbusSoftmax. See Personalizer & Middleware.
Availability
  • Python SDK: ✅ NimbusSoftmax via the optional softmax extra
  • Julia SDK: ❌ Use NimbusProbit for Julia’s non-Gaussian static classifier

Install

NimbusSoftmax depends on the optional JAX-based softmax backend:

Quick Start

NimbusSoftmax expects preprocessed feature rows shaped (n_trials, n_features), not raw EEG. Use CSP, ERP amplitude, bandpower, or your own feature extraction before fitting.

When to Use NimbusSoftmax

  • You are using the Python SDK and need a flexible static classifier.
  • Class boundaries are non-Gaussian or not well represented by class-conditional means/covariances.
  • You need uncertainty-aware outputs for rejection policies, active learning, or calibration analysis.
  • NimbusLDA / NimbusQDA accuracy has plateaued on a complex multinomial task.

When Not to Use It

  • If latency is the top priority: start with NimbusLDA, then NimbusQDA.
  • If class centers and Mahalanobis distance are important for interpretability or outlier diagnostics: use NimbusLDA or NimbusQDA.
  • If the session is drifting over time: use NimbusSTS.
  • If you are using Julia: use NimbusProbit.

Model Architecture

NimbusSoftmax fits a Bayesian multinomial logistic regression model. It uses a reference-class parameterization, so one class has zero logits and the remaining classes are modeled relative to it.
The fitted model stores posterior Gaussian approximations for non-reference class weights. Predictions can draw posterior samples to quantify uncertainty.

Hyperparameters

Usage

Train and Predict

Tune with sklearn

Online Updates

Active Learning

NimbusSoftmax supports BALD through posterior predictive samples, so it can drive label-efficient calibration loops.
See Active Learning for the full calibration workflow.

Training Requirements

  • Minimum: at least 2 observations are required.
  • Recommended: 40+ trials per class for stable estimates.
  • Feature normalization: strongly recommended for cross-session stability.
  • Input shape: (n_trials, n_features).

Performance Characteristics

NimbusSoftmax is usually slower than NimbusLDA and NimbusQDA, but can improve accuracy when class boundaries are not well represented by Gaussian class-conditionals.

Model Inspection

Model Selection Context

Use NimbusSoftmax when you are in Python and need a non-Gaussian static classifier with posterior sampling support. If you need explicit class centers or Mahalanobis diagnostics, use NimbusLDA or NimbusQDA. If the session drifts over time, use NimbusSTS. For the canonical side-by-side comparison, see Model Specification.

Next Read

NimbusProbit (Julia)

Julia’s non-Gaussian static classifier.

Python API Reference

Full NimbusSoftmax constructor and method reference.

Active Learning

Use posterior samples to reduce calibration labels.

Model Selection

Compare Nimbus model families.

References

Implementation:
  • Python source code: nimbus_bci/models/nimbus_softmax/ in nimbus-bci
Theory:
  • Polson, N. G., Scott, J. G., & Windle, J. (2013). “Bayesian inference for logistic models using Pólya-Gamma latent variables”
  • Windle, J., Polson, N. G., & Scott, J. G. (2014). “Sampling Pólya-Gamma random variates: alternative and approximate techniques”
  • Bayesian multinomial logistic regression with Polya-Gamma augmentation and variational inference