Skip to main content
The encode hook is not a gap — it is the product boundary. Nimbus does not host DL architectures. Integrators (or thin shortcuts) supply embeddings. Rules:
  • Freeze the trunk before personalizing
  • Feed embeddings, never class logits
  • Personalizer.load / from_profile require re-attaching the encoder
  • Optional embedding_dim= validates embedding width
  • Prefer factories (for_deployment, for_features, …) over raw constructors

Canonical recipe

Already have features / CSP / Riemann vectors? Skip the trunk:
Riemann / P300 paradigms (pip install nimbus-bci[riemann]):
Online head updates default to cumulative (λ=1, byte-identical to 0.5). Optional forgetting on LDA/QDA uses λ\<1 (recency factor). Prefer session calibration and short stream budgets unless you intentionally enable forgetting.
Foundation pooling: REVE / EEGPT adapters mean-pool (or flatten) token / patch features to flat (n, d) so LDA/QDA heads can consume them. Spatial/temporal structure is collapsed at the encoder boundary, not inside the Bayesian head.

Precomputed embeddings (x_kind="embeddings")

When embeddings are generated upstream — for example, served by an inference microservice, extracted in batch, or streamed from an external feature store — you do not need to wrap an encoder function. Pass x_kind="embeddings":
Contract Rules:
  • encoder.encode() is never invoked.
  • Head fitting, online partial_fit(), and embedding transforms (transform="standardize", etc.) operate directly on Z.
  • Operations that require raw EEG or encoder access raise PersonalizerInputError:
    • Trunk adaptation (adapt(level="trunk"), adapt_trunk, adapt_async, fit_tent)
    • Trunk MC sampling (mc_samples with n_trunk >= 2)
    • Riemannian geodesic reference tracking
  • Persistence Round-Trip: The declared x_kind and observed embed_dim persist in profile metadata (export_profile() / save()). Restoring via from_profile() verifies width and protects against mismatched re-fits.

Ladder levels under one API

Shipped Personalizer path (same trunk, no architecture change): Opt-in / priced (not deployment defaults): Linear probe (LP) in Evidence is a matched sklearn control on the same frozen Z, not a ladder level. Plain-language legend: Overview. Evidence for when L1 helps and how L3 is priced: Evidence. Heads: product default is LDA (head="lda"). QDA is a documented severe-shift option behind the same API; Softmax stays optional (nimbus-bci[softmax]). The multi-trunk map in Paper 1 locks LDA for comparability — numbers for LDA vs QDA vs Softmax (EEGNet): Evidence → Which head?.

Optional shortcuts

Named helpers only reduce boilerplate. Architectures stay outside core:
Claim for second trunks: API interchangeability under the same Personalizer / BrainState contract — not a confirmatory accuracy bake-off.

Active learning → personalization

Prefer Personalizer wrappers (encode for you), or CalibrationSession on the head:
See Active Learning.

Next Read

BrainState

Evidence

Overview

API Reference