metacausal.CateEstimate¶
- class metacausal.CateEstimate(cate, component_estimates, aggregation, ensemble_weights=None)[source]¶
Bases:
objectEnsemble CATE result. Pure data, no model references.
- Variables:
cate (numpy.ndarray) – Aggregated per-observation treatment effects, shape (n,).
component_estimates (dict[str, metacausal.estimators.ComponentCateEstimate]) – Per-method CATE results, keyed by method name. Only includes methods with
supports_cate=True.aggregation (str) – Aggregation strategy class name.
ensemble_weights (metacausal.aggregation.weights.EnsembleWeights | None) – Weight vector from the aggregation strategy. None for pointwise strategies (Median, Mean).
- Parameters:
cate (ndarray)
component_estimates (dict[str, ComponentCateEstimate])
aggregation (str)
ensemble_weights (EnsembleWeights | None)
Methods
__init__Ensemble CATE along one covariate (no CI band; use
cate_profile()for a bootstrap band).Return a formatted, multi-line CATE summary.
Attributes
CATE arrays from each component method.
Number of methods that produced CATE estimates.
Details
- cate_profile(x, *, xlabel, ax=None, show_components=True, ylim=None, ensemble_label='Ensemble CATE')[source]¶
Ensemble CATE along one covariate (no CI band; use
cate_profile()for a bootstrap band).Thin wrapper around
metacausal.plots.cate_profile(); see there for the full parameter reference. Requires theplotsextra (pip install 'metacausal[plots]').
- component_estimates: dict[str, ComponentCateEstimate]¶
- ensemble_weights: EnsembleWeights | None = None¶