NimbusSTS | Julia: not availableMathematical model: a softmax emission over the features plus a latent state tracked by an extended Kalman filter (EKF)
NimbusSTS is the one head with a memory. Beside the usual “features → class” map it keeps a latent state z that evolves from trial to trial, so it can follow a class-prior that shifts with fatigue, electrode impedance, or a new day — without refitting the whole head. That state is the only thing that is filtered; the emission weights are point estimates trained by SGD.
Python head: standalone
NimbusSTS, streamed through StreamingSession in STS mode. Personalizer does not ship it as a head= value; it is the classical path for non-stationary sessions. See Personalizer.Quick start
When to use NimbusSTS
- A long session — thirty minutes or more — with fatigue or impedance drift.
- Cross-day experiments where electrode positions move and you want to carry state over.
- Delayed-feedback loops: predict on the prior, update when the label arrives.
When not to use it
- Stationary data. A state costs trials to track and parameters to tune;
NimbusLDAis faster and simpler. - You need the fastest inference. The EKF step is not free;
NimbusLDAis. - You need epistemic uncertainty. Only
zcarries a posterior. BALD,predict_proba_samplesand Personalizermc_samplesraiseNotImplementedErroron this head. For active learning useentropy/margin/least_confidence, or switch to LDA, QDA or Softmax. - A single-pass learner.
fitruns the EKF over the full training sequence, so this is a batch trainer despite the “streaming” framing.
Model
z captures what persists across samples — a slowly turning class-prior or logit bias. During training the EKF updates z from the labels, and emission gradients use the one-step prediction so the current label does not leak into its own regressor. During inference, propagate_state() advances the prior without a label.
Hyperparameters
transition_cov is the one to tune. Smaller is a slower drift (multi-day stability, short sessions); 0.01 is within-session adaptation; larger is a fast-moving environment such as mobile recording with changing impedance. Start at the default and move an order of magnitude at a time.
State: the API
A time-ordered loop with delayed feedback
In a real BCI the label is not available at prediction time. Predict on the prior, update when feedback arrives:propagate_state() call a stream is scored as if every trial were independent — clf.score(X_stream, y_stream) does exactly that, and is the baseline to beat.
Carrying state into the next session
Start day 2 from an informed prior, widened so it can adapt:state_dim defaults to n_classes − 1, so a calibration that is missing a class gives the new head a smaller state and set_latent_state refuses the transfer on the shape. If day 2 cannot label every class up front, pass the same explicit state_dim to both heads.
Streaming
StreamingSession runs in STS mode when you hand it the fitted NimbusSTS estimator (not its .model_): every process_chunk advances the latent state by one step first, and a late label can be fed back through provide_feedback.
provide_feedback goes between the last process_chunk and finalize_trial. finalize_trial clears the trial, so a feedback call after it raises; its own label= argument only fills the result’s calibration readout and does not touch the model. finalize_trial resets the trial for you, and neither method resets the latent state — that is clf.reset_state().
Chunk sizes, aggregation and the bridge to BrainState: Python streaming inference.
Model selection context
No preregistered cell has read
NimbusSTS against the other heads; it is shipped as a capability, not as an accuracy claim. What has been measured head against head: Evidence.
Next read
Python streaming inference
StreamingSession in STS mode, chunk sizes and aggregation.Online Safety Layer
Governing
partial_fit with budgets, drift monitors and rollback.NimbusLDA
The default head, when the data does not drift.
API Reference
The full
NimbusSTS signature.