Skip to main content
BrainState is the app-facing output. Key fields: Use BrainState.to_dict() for JSON-friendly export (brain_state_version is currently 1).

Trial gate vs adapt recommendation

These are different signals: Prefer Personalizer.adapt(...) as the label-agnostic adaptation gateway (head update, unsupervised transform alignment, or trunk PEFT). recommend_adapt remains a thin mean-shift helper against a user-supplied tau (L0 stay vs L1 stream update only). It does not auto-escalate to affine maps or full fine-tune. Optional session metadata:
After Personalizer.load, pass X_ref= (calibration embeddings are not serialized).

Decision presets

0.6 rename: "research" → "strict", "consumer" → "permissive". Old strings raise ValueError.
Uncertainty fusion: BrainState.uncertainty is max(normalized_entropy, upstream) when upstream is set. Gating checks entropy and upstream thresholds independently. Optional mc_samples>=2 on Personalizer draws posterior samples and sets normalized epistemic uncertainty (BALD / log2 K) as Prediction.uncertainty. MAP intent and confidence still use closed-form predict_proba. Breakdown bits land in BrainState.extras (total_entropy_bits, aleatoric_bits, epistemic_bits).

Dual API & bridges

Upstream probabilities only (no head required):
See also Python Streaming Inference for the streaming bridge in context.

Next Read

Encoder contract

Evidence

Overview

Streaming