Skip to main content

Module aggregation

Module aggregation 

Source

Structs§

AggregatedPredictionBlock
AggregationControllerResult
AggregationControllerTask
ObservationPredictionBlock

Enums§

AggregationControllerInput
AggregationControllerOutput
PredictionUnitId

Constants§

AGGREGATION_CONTROLLER_RESULT_SCHEMA_ID
AGGREGATION_CONTROLLER_RESULT_SCHEMA_VERSION
AGGREGATION_CONTROLLER_TASK_SCHEMA_ID
AGGREGATION_CONTROLLER_TASK_SCHEMA_VERSION

Functions§

aggregate_observation_predictions
aggregate_sample_predictions_by_unit
reduce_predictions_across_branches
Reduce one prediction block per branch (each from a different producer/model) into a single fused block under merge_node, keyed by sample_id. This is the cross-branch analogue of reduce_predictions_across_folds: where that joins folds of one producer, this joins branches of one merge point. Asymmetric-branch fusion is intrinsic — a modelless branch simply emits no PredictionBlock, so it is absent from branch_blocks and contributes nothing. A sample is averaged over exactly the model-bearing branches that predicted it (its branch coverage), never over a fixed denominator, so partial coverage does not silently down-weight a sample. The join is identity-keyed and the union sample order is first-seen; positional joins are never used.
reduce_predictions_across_folds
Reduce per-fold prediction blocks (same producer + partition) into one block, keyed by sample_id — the native cross-fold ensemble dag-ml previously lacked. A sample that appears in exactly one fold (the disjoint OOF/validation case) passes through unchanged (mean-of-one); a sample predicted by several folds (the shared train/test case) is (weighted) averaged. avg = no weights; w_avg = per-fold weights (e.g. 1/shifted_val_rmse). First-seen sample order is preserved; the join is identity-keyed, never positional.
reduce_proba_mean_across_branches
Probability-mean fusion for classification: average per-class probability rows across branches, keyed by sample_id, under merge_node. Each row of every branch block is treated as a probability vector over the same width classes; rows must be finite, non-negative and sum to 1 (within PROBA_SUM_TOLERANCE). Like reduce_predictions_across_branches this is asymmetric-branch safe — modelless branches contribute no block — and each sample is averaged only over the branches that predicted it. The fused rows are renormalized so each output row is itself a valid probability distribution (it already sums to 1 under equal per-branch weight, but renormalization keeps the contract exact under floating-point and partial coverage).