coco_pipe.diagnostics.streaming_variance#
Exact variance diagnostics over re-iterable feature batches.
Attributes#
Functions#
|
Fit a deterministic CPU PyTorch multinomial probe over streamed batches. |
|
Return the dense diagnostic schema without assembling a feature matrix. |
Module Contents#
- type coco_pipe.diagnostics.streaming_variance.FeatureBatchSource = Iterable[FeatureBatch] | Callable[[], Iterable[FeatureBatch]]#
- coco_pipe.diagnostics.streaming_variance.DEFAULT_PARTICIPATION_RATIO_MAX_GRAM_BYTES = 4294967296#
- coco_pipe.diagnostics.streaming_variance.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.
- coco_pipe.diagnostics.streaming_variance.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_batchesmust 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.- Parameters:
feature_batches (FeatureBatchSource)
feature_scaling (Literal['none', 'zscore'])
n_null_permutations (int)
rng (numpy.random.Generator | None)
probe_cap (int)
probe_n_splits (int)
probe_seed (int)
probe_epochs (int)
probe_learning_rate (float)
probe_weight_decay (float)
participation_ratio_max_gram_bytes (int)
- Return type: