habit.combiners: compose feature trees

Built-in feature block combiners and their registry.

Combiners are the internal nodes of a feature composition tree: they merge the column blocks their sibling nodes produced and never touch images, subjects, or the filesystem. The same combiner implementations serve every granularity (voxel, supervoxel, habitat), because the tree wrappers hand them plain DataFrame blocks with positionally aligned rows.

User guide: Habitat domain API. Component names: Habitat Spec component catalog.

Concat, ratio, kinetic, and expression trees over extractors (concat(raw("T1"), voxel_radiomics("T2"))).

Classes

Combiner

Merge the feature blocks produced by sibling nodes of a feature tree.

ConcatCombiner

Merge sibling blocks by placing their columns side by side.

WeightedConcatCombiner

Concatenate sibling blocks after scaling each by a child-specific weight.

AverageCombiner

Average sibling blocks element-wise, optionally with child weights.

RatioCombiner

Element-wise ratio of two sibling blocks: first / (second + eps).

DifferenceCombiner

Element-wise difference of two sibling blocks: first - second.

ExpressionCombiner

Features defined by restricted arithmetic over sibling block columns.

KineticCombiner

Per-unit enhancement slopes across a dynamic contrast series.

CombinerRegistry

Name-to-implementation registry for feature block combiners.

Functions

block_sources

Resolve the source label of each child block, in child order.

check_blocks

Require at least one block and a shared row count across siblings.

concat_blocks

Concatenate child blocks column-wise with a duplicate-column guard.