metacausal.aggregation.AgreementStrategy¶
- class metacausal.aggregation.AgreementStrategy[source]¶
Bases:
AggregationStrategyBase class for strategies that select/weight models by inter-model agreement.
Weights are computed at fit time from training-data CATE predictions (no outcome data involved). Subclasses implement
compute_weights().ATE is computed as the mean of the ensemble CATE, not by aggregating scalar component ATEs. For bootstrap replicates, weights are recomputed from resampled training-data CATE predictions.
Methods
__init__Aggregate component CATEs using stored weights.
Compute weights from inter-model agreement on training predictions.
Attributes
Ensemble weights computed during
fit().Details
- aggregate(values)[source]¶
Aggregate component CATEs using stored weights.
- Parameters:
values (array of shape (K, n))
- Returns:
Array of shape (n,).
- Return type:
- abstractmethod compute_weights(cate_matrix, model_names)[source]¶
Compute weights from inter-model agreement on training predictions.
Called once during
fit(), after component models are fitted on full training data. Subclasses implement this.- Parameters:
- Returns:
EnsembleWeights populated with this strategy’s weights.
- Return type:
- property ensemble_weights: EnsembleWeights | None¶
Ensemble weights computed during
fit().Nonebeforefit().