coco_pipe.report.variance#

Reusable scientific report section for subject-alignment diagnostics.

Functions#

validate_subject_alignment_diagnostics(diagnostics)

Validate and copy the generic subject-alignment diagnostics table.

select_subject_alignment_diagnostics(diagnostics, *, ...)

Validate and select one exact cohort/population diagnostic assessment.

build_alignment_coverage_section(diagnostics, *[, title])

Compare exact diagnostic populations across embedding models.

build_alignment_tradeoff_section(performance, ...[, title])

Join paired decoding and leakage deltas and mark Pareto-optimal transforms.

build_subject_alignment_diagnostics_section(diagnostics, *)

Build a scientific before/after report section for subject alignment.

Module Contents#

coco_pipe.report.variance.validate_subject_alignment_diagnostics(diagnostics)#

Validate and copy the generic subject-alignment diagnostics table.

Parameters:

diagnostics (pandas.DataFrame)

Return type:

pandas.DataFrame

coco_pipe.report.variance.select_subject_alignment_diagnostics(diagnostics, *, cohort_name, population)#

Validate and select one exact cohort/population diagnostic assessment.

Parameters:
Return type:

pandas.DataFrame

coco_pipe.report.variance.build_alignment_coverage_section(diagnostics, *, title='Cross-Model Diagnostic Coverage')#

Compare exact diagnostic populations across embedding models.

Parameters:
Return type:

coco_pipe.report.core.Section | None

coco_pipe.report.variance.build_alignment_tradeoff_section(performance, diagnostics, *, title='Performance-Alignment Trade-off')#

Join paired decoding and leakage deltas and mark Pareto-optimal transforms.

Parameters:
Return type:

coco_pipe.report.core.Section | None

coco_pipe.report.variance.build_subject_alignment_diagnostics_section(diagnostics, *, scatter_figure=None, title='Subject Alignment Diagnostics')#

Build a scientific before/after report section for subject alignment.

The section tests the intended trade-off: subject-identifiable structure should decrease while label-relevant structure is retained. It supports the tidy output of coco_pipe.diagnostics.variance_decomposition_report(). The optional scatter is caller-provided because embedding loading and projection are dataset-specific and are qualitative only.

Parameters:
Return type:

coco_pipe.report.core.Section | None