cleverly.EstimationMethod#
- class cleverly.EstimationMethod(*args, **kwargs)[source]#
Define the contract for an evidenced estimation method.
- Parameters:
- *args, **kwargs
Present because
typing.runtime_checkable()gives a protocol a synthetic constructor. A protocol is implemented, not instantiated.
- Attributes:
See also
TMLEMethodThe analytic point-treatment implementation.
CollaborativeTMLEMethodAdds collaborative treatment-mechanism selection.
DRTMLEMethodAdds the reduced-dimension doubly robust correction.
cleverly.IdentifiedEffectWhat a method is handed to in order to fit.
Examples
Every shipped method satisfies the protocol, so application code can accept any of them and read the same members:
>>> from cleverly import DRTMLEMethod, EstimationMethod, TMLEMethod >>> methods = [TMLEMethod(), DRTMLEMethod()] >>> [method.name for method in methods] ['tmle', 'drtmle'] >>> all(isinstance(method, EstimationMethod) for method in methods) True
Methods#
- EstimationMethod.estimator_kwargs(*, longitudinal: bool = False) dict[str, Any][source]#
Translate public configuration into an engine request.
- EstimationMethod.with_overrides(**overrides: Any) EstimationMethod[source]#
Return a normalized copy after applying convenience options.
- Parameters:
- **overrides
Any Supported flat configuration shortcuts.
- **overrides
- Returns:
EstimationMethodNew immutable method configuration.
Attributes#
- EstimationMethod.name#
Return the stable method name.