metacausal.aggregation.AggregationStrategy¶
- class metacausal.aggregation.AggregationStrategy[source]¶
Bases:
ABCAbstract base class for all aggregation strategies.
Three concrete families inherit from this base —
PointwiseStrategy,AgreementStrategy,SupervisedStrategy— and runtime dispatch inCausalEnsemblekeys off the family base, since each family has a different fit-time and predict-time contract. All three families implement the same prediction-time operation:aggregate()reduces along axis 0.Methods
__init__Reduce a
(K, n)component-CATE matrix to a(n,)ensemble CATE.Attributes
Ensemble weights, if applicable.
Details
- abstractmethod aggregate(values)[source]¶
Reduce a
(K, n)component-CATE matrix to a(n,)ensemble CATE.Kis the number of component models;nis the number of evaluation points. Subclasses define the per-family rule (pointwise statistical reduction, weighted combination, learned linear combination, etc.).PointwiseStrategyextends this contract to also accept(K,)1-D input (returning a 0-d scalar) for the component-ATE aggregation path; see its class docstring. Other families do not meaningfully support 1-D input.
- abstract property ensemble_weights: EnsembleWeights | None¶
Ensemble weights, if applicable.
Nonefor pointwise strategies.