coco_pipe.diagnostics.streaming_variance ======================================== .. py:module:: coco_pipe.diagnostics.streaming_variance .. autoapi-nested-parse:: Exact variance diagnostics over re-iterable feature batches. Attributes ---------- .. autoapisummary:: coco_pipe.diagnostics.streaming_variance.FeatureBatch coco_pipe.diagnostics.streaming_variance.FeatureBatchSource coco_pipe.diagnostics.streaming_variance.DEFAULT_PARTICIPATION_RATIO_MAX_GRAM_BYTES Functions --------- .. autoapisummary:: coco_pipe.diagnostics.streaming_variance.streamed_subject_probe coco_pipe.diagnostics.streaming_variance.streamed_variance_decomposition_report Module Contents --------------- .. py:type:: FeatureBatch :canonical: tuple[np.ndarray, np.ndarray] .. py:type:: FeatureBatchSource :canonical: Iterable[FeatureBatch] | Callable[[], Iterable[FeatureBatch]] .. py:data:: DEFAULT_PARTICIPATION_RATIO_MAX_GRAM_BYTES :value: 4294967296 .. py:function:: streamed_subject_probe(feature_batches, subject, *, cap = 100, n_splits = 5, seed = 42, blocks=None, epochs = 10, learning_rate = 0.01, weight_decay = 0.0001, _n_features = None, _validated = False) Fit a deterministic CPU PyTorch multinomial probe over streamed batches. .. py:function:: streamed_variance_decomposition_report(feature_batches, subject, label, *, feature_scaling = 'zscore', n_null_permutations = 200, rng = None, probe_blocks=None, probe_cap = 100, probe_n_splits = 5, probe_seed = 42, probe_epochs = 10, probe_learning_rate = 0.01, probe_weight_decay = 0.0001, participation_ratio_max_gram_bytes = DEFAULT_PARTICIPATION_RATIO_MAX_GRAM_BYTES) Return the dense diagnostic schema without assembling a feature matrix. ``feature_batches`` must be re-iterable (or a callable returning an iterable) and yield ``(row_indices, features)`` pairs. Row indices refer to the supplied subject/label vectors and must cover them exactly once per complete pass.