habit.recipes: named study designs

L4 recipes: named study designs, assembled from L3 components.

A recipe is the shortest path from “I want a two-step habitat analysis” to a result object, and nothing more. It contains no engine of its own: no run loop, no resume, no configuration parsing, no output directory. Those live in the execution backends (L1/L2), the writers (L1) and the CLI (L5) respectively, which is what keeps a recipe callable from a notebook, a web service or someone else’s pipeline.

User guide: Habitat Guide Habitat Guide (especially 4. Three habitat designs) · Python API guide (v2.0). Component names: Habitat Spec component catalog.

Primary entry: Study (sklearn-style fit() / fit_predict() / predict()). Factories two_step_habitat / one_step_habitat / direct_pooling_habitat build a Study with a declared design.

Tabular ML helpers that also live in this package (train_model, cross_validate, …) are on Tabular ML (bookmark), not in the tables below. Image-preprocessing recipes are on Image preprocessing (bookmark). Report and figure atoms are on habit.report: run-scoped persistence and figures.

Classes

Study

A habitat analysis declared independently of any cohort.

StudyResult

What a fitted study hands back, entirely in memory.

Functions

two_step_habitat

Declare a classical two-step habitat study.

one_step_habitat

Declare a one-step habitat study (habitats defined inside each subject).

direct_pooling_habitat

Declare a direct-pooling habitat study (voxels pooled across the cohort).

extract_habitat_features

Extract features from pre-computed habitat maps (habit extract recipe).

traditional_radiomics

Run standalone PyRadiomics with all declared YAML processing controls.

identify_precise_voxel_features

Identify the voxel features precise enough to define habitats.

voxel_radiomics_factory

Build the default extractor: the bundled voxel preset at one grid point.

prior2024_voxel_extract_params

Overlay Prior 2024 ROI_R*B*.yaml extract settings on a params dict.

run_from_yaml

Run a YAML configuration document through the matching recipe.

Supporting recipes

DICOM / table utilities still exported from habit.recipes:

icc_analysis

Run ICC reliability analysis from a validated config (habit icc).

sort_dicom

Run the standalone DICOM sort pipeline (habit sort-dicom recipe).

dice

Compute pairwise Dice coefficients between two mask batches.

dicom_info

Extract selected DICOM tags from files or directories.

merge_tables

Merge feature tables horizontally on a shared index column.