nimbus_bci.ssvep arrived in 0.9.0 with filter-bank CCA and TRCA. 0.10.0 fixed three encoder defects, changed the default filter banks, and added TDCA and NimbusFusion. If you calibrated SSVEP profiles under 0.9.0, read Upgrading from 0.9 before loading them.The recipe
sfreqis mandatory. The epoch length is part of the geometry: a different length is refused.methodpicks the encoder."fbcca"is label-free in its features;"trca"and"tdca"learn spatial filters from labelled trials, so the head’s calibration needs labels.head="fusion"keeps the classic rule as the decision and learns only how sharp the fused scores are. It needstransform=None.head="lda"(the default) puts the ordinary Bayesian head on the encoder’s features. On SSVEP it sits below the rule; for accuracy the classic rule is the better head.
The three encoders
Each encoder carries the classic decision as a method —
encoder.fbcca_scores(X), encoder.fbtrca_scores(X), encoder.fbtdca_scores(X) — so the rule can be compared with the head on the same trials. filter_bank= ("reference" or "legacy") and bands= (a list of nimbus_bci.ssvep.SubBand) override the bank; n_harmonics=None uses one reference harmonic per sub-band.
The sub-band weights of the fused score follow the reference: m^-1.25 + 0.25 for sub-band m. The filter bank and the TRCA math are public in nimbus_bci.ssvep.filters (SubBand, reference_filter_bank, apply_band) and as trca_filter, fbtrca_features, filter_bank_weights.
NimbusFusion: the classic decision as a head
The published SSVEP decoders are a fixed rule — weight the sub-bands, sum, take the largest class — and a learned classifier on top of their features sits far below it. On Wang2016 at 2 s the FBCCA head reads 0.267 against 0.723 for the rule.
NimbusFusion keeps the rule and learns one thing: how sharp the fused scores are, as a Bayesian posterior over a single scalar on a fixed grid. predict is the rule (argmax of the classic scores); predict_proba is the learned posterior mixture. The sharpness is fitted on out-of-fold features, because a supervised encoder’s own training features are optimistic.
It is a built-in head — string key fusion, model type nimbus_fusion — with save / load, partial_fit (which updates the sharpness online), and the gates of the Personalizer on top of it.
What was measured (preregistered, Wang2016 and MAMEM3, verdict PASS): through the deployed path the head’s accuracy equals the rule’s — none of the 5,440 + 825 test trials is decided differently — and the conformal guarantee holds on it (Wang2016, coverage − nominal +0.005 to +0.014 in expectation at 0.5 to 4 s, accepted-and-wrong at most 0.010). What it does not certify: the accuracies themselves, whose defaults were chosen on this corpus; and the rule is not always the better head — on MAMEM3 at 4 s the LDA head is 0.035 better.
What the decoders reach
Balanced accuracy of the classic decision, read offline on public corpora:- Wang2016 is the corpus the defaults were chosen on. The TDCA row was read after the fact; FBCCA and TRCA in preregistered cells after the 0.10.0 encoder fixes. In 0.9.0, classic FBCCA read 0.668 at 4 s on this corpus — that figure measured the encoder defects and is withdrawn.
- Nakanishi 2015 is a corpus the defaults were not chosen on, read in a preregistered cell with every default as it ships: the recipe travels. At 1 s it is ahead of the SDK’s own FBCCA by 0.641 in 9 of 9 subjects. The limit: the comparator is the SDK’s FBCCA, not the best published CCA — the corpus’s paper reports 79.56 % at 0.5 s for its own combination — so this is “the defaults travel”, not “ahead of the literature”.
Read gate figures as an expectation. A conformal margin recorded at one randomization of the gate is one favourable draw. Over 100 draws of the gate the Wang2016 coverage above nominal is +0.005 / +0.014 / +0.009 / +0.011 at 0.5 / 1 / 2 / 4 s, and 0.53 / 0.86 / 0.90 / 0.90 of the trials are certified. Quote the expectation.
The gates on SSVEP decoders
Both certificates of Trust & calibration ride onNimbusFusion. Measured on Wang2016 with the TDCA fusion path at alpha = 0.1 (preregistered, exploratory, within-session):
The risk gate keeps its promise at every window, and sends more than the conformal gate because it refuses only what the error budget requires. What it sends is correspondingly less right than what the conformal gate certifies (0.979 / 0.995 / 0.998 / 0.999 in expectation). On the same corpus with the same recipe, carried into the next session of Nakanishi 2015, the risk gate’s wrong commands were 0.074 / 0.020 / 0.006 / 0.003 of all trials.
Certified typing over LSL
The package repository carriesexamples/certified_typing_live.py: the deployed SSVEP path one trial at a time — markers and EEG in over LabStreamingLayer, a keystroke when both gates pass and a refusal otherwise, one row per attempt with each gate’s own verdict and the latency from onset to decision. It opens its streams before it waits for a marker; a speller closes a block with an end marker, and without one the loop waits --idle-timeout seconds (60) after the last marker. A saved profile carries its encoder beside it (<name>.encoder.json), because TDCA’s filters are learned from labelled trials.
--simulate feeds it synthetic flicker and checks its own wiring — the loop decides as a batch does on the same epochs, and a saved profile reloads and types the same keys. It is a check of the wiring, not a measurement: no live session has been measured yet.
Upgrading from 0.9
- The default filter banks changed. FBCCA now builds the cumulative bank; a profile saved under the 0.9.0 defaults must be refit, or re-attached with the 0.9.0 configuration:
filter_bank="legacy", n_harmonics=2. - Encoder
state_dicts written by 0.9.0 still load — FBCCA silently, TRCA with a warning that its stored geometry predates the per-sub-band fix. - TRCA and the units of the data. TRCA no longer depends on whether the data are volts or microvolts; FBCCA no longer reads noise from rank-deficient trials (a dead or duplicated channel, an average reference).
- The pinned rate on
NimbusFusionis unchanged.fit_calibratedstill pins an accept rate on it, and a certificate is stacked on the fixed checks — unlike the four heads where a certificate now decides.
Next read
Trust & calibration
The conformal and risk gates, and what each promises.
Paradigms & profiles
Motor imagery and P300 recipes beside SSVEP.
Real-Time BCI Setup
The LSL pattern the typing loop runs on.
Changelog
Everything that changed in 0.10.0.