aggregate#

ibl_bwb_eval.scoring.aggregation.aggregate(raw, clip_metrics=frozenset({'bps', 'poisson_d2', 'r2'}), clip_min=0.0)[source]#

Clip designated metrics at clip_min per seed, then aggregate over seeds.

Accepts raw keys in either the 4-tuple (label, task, recording_id, seed) shape or the 3-tuple (label, task, seed) shape for suites with no session dimension (e.g. TS3).

Returns a dict keyed by (label, task, recording_id) where each value maps metric name to (mean, sem, n), the same shape as each suite’s own summarize(), with clipping applied.

Return type:

dict[tuple[str, str, str], dict[str, tuple[float, float | None, int]]]