coco_pipe.decoding.targets ========================== .. py:module:: coco_pipe.decoding.targets .. autoapi-nested-parse:: Target-label resolution and grouped-cross-validation fold helpers. Functions --------- .. autoapisummary:: coco_pipe.decoding.targets.prepare_target coco_pipe.decoding.targets.safe_group_n_splits Module Contents --------------- .. py:function:: prepare_target(container, target_spec, group_col = 'patient_group_id') Resolve labels and leakage-safe groups from a ``~coco_pipe.io.DataContainer``. Binary targets require an explicit ``positive_class``. This prevents alphabetical class ordering from silently changing ROC-AUC, precision, recall, and F1 semantics. .. py:function:: safe_group_n_splits(y, groups, requested = 5, stratified = True) Return the largest viable grouped fold count.