Skip to main content
Python: NimbusQDA | Julia: NimbusQDA, a different implementation on RxInfer.jl — see the Julia API reference
Mathematical model: Normal-Inverse-Wishart posterior per class — its own mean and its own precision; Student-t predictive
NimbusQDA drops the one thing NimbusLDA assumes: that every class has the same covariance. Each class gets its own, so the decision boundary is quadratic and a class that is tight next to one that is diffuse is separated the way the data says it should be. It costs more trials to estimate, and the head is honest about that — with few trials the priors hold each covariance close to the pooled one.
Python Personalizer head: Personalizer(head="qda"), or Personalizer.for_features(classes, head="qda"); the P300 recipe Personalizer.for_p300 builds on this family. On this head fit_calibrated fits a certificate. See Trust & calibration.

Quick start

sklearn-compatible, like every head: make_pipeline(StandardScaler(), NimbusQDA()), cross_val_score, GridSearchCV.

When to use NimbusQDA

  • The classes differ in variance as much as in mean — a P300 target response against a frequent non-target, where the classes overlap in amplitude but not in shape.
  • Two-class problems with uneven class sizes; the per-class covariances are estimated separately, so the smaller class is not forced into the larger one’s shape.
  • You have enough trials per class for a covariance each — a few dozen is the practical floor.

When not to use it

  • The classes share a covariance. QDA then pays for flexibility it does not use and is the noisier estimate. Use NimbusLDA — it is the default for a reason.
  • Few trials per class. A covariance per class is many parameters; the head leans on its prior, and the boundary is closer to linear than the name suggests.
  • Non-Gaussian boundaries. Use NimbusSoftmax.
  • A frozen trunk’s embeddings with few trials. Use NimbusProbit.

Model

Per class k, a Normal-Inverse-Wishart posterior over (mu_k, W_k), and a class conditional p(x | y = k) = N(mu_k, W_k⁻¹). Conjugate priors make the posterior closed-form and partial_fit an exact update. The predictive integrates over the posterior — a Student-t per class, not a plug-in Gaussian.

Hyperparameters

NimbusQDA has no kappa0: the prior weight on the means is set through mu_scale or prior_fraction.

The gate behind it

The fixed gate let nearly everything through: within a session on BNCI2015-001 it sent 83–99 % of the test trials with 19.6–36.5 % of all trials wrong commands, and the pinned accept rate sent 52–70 % with 14.4–26.1 % wrong (cell S22, read once). QDA’s posteriors are confident more often than they are right, which is exactly the case a certificate is for.
The risk gate kept wrong commands at 0.035–0.100 of all trials from 8 held-out trials per class on, sending 0.23–0.54 of the trials and none at all on 9 % of the draws; at 4 per class on two classes nothing is certified at alpha 0.1. Details: Trust & calibration.

Model inspection

Model selection context

Head against head on the same corpora: Evidence.

Next read

Paradigms & profiles

The P300 recipe and session bundles.

Trust & calibration

The certificate that decides in front of this head.

sklearn Integration

Pipelines, cross-validation and tuning with the heads.

Evidence

QDA against LDA, Softmax and logistic regression.