metacausal.adapters.CausalEstimator¶
- class metacausal.adapters.CausalEstimator(*args, **kwargs)[source]¶
Bases:
ProtocolProtocol that all causal estimator adapters must satisfy.
Any object with a
nameproperty,supports_cateflag, thesupported_outcome_typesdeclaration, andfit/ate/cate/validate_outcome_typemethods matching this signature can be used as a component inCausalEnsemble.Outcome-type capability is declared via two members:
supported_outcome_types: a tuple of strings drawn from("continuous", "binary")indicating which outcome types this adapter can handle. The ensemble filters the candidate pool against the detected outcome type using this declaration: components whose tuple lacks the detected type are dropped before fitting.validate_outcome_type(detected): raisesValueErrorif the adapter’s configured nuisance learners are inconsistent with the detected outcome type — for example, a regressor wired into a slot that needs a classifier whenYis binary. For adapters with no user-configurable nuisance, a no-op is appropriate.
Methods
__init__Attributes
Details