causal_testing.testing.causal_effect
This module contains the CausalEffect abstract class, as well as the concrete extension classes: ExactValue, Positive, Negative, SomeEffect, NoEffect
Module Contents
Classes
An abstract class representing an expected causal effect. |
|
An extension of CausalEffect representing that the expected causal effect should not be zero. |
|
An extension of CausalEffect representing that the expected causal effect should be zero. |
|
An extension of CausalEffect representing that the expected causal effect should be a specific value. |
|
An extension of CausalEffect representing that the expected causal effect should be positive. |
|
An extension of CausalEffect representing that the expected causal effect should be negative. |
- class causal_testing.testing.causal_effect.CausalEffect
Bases:
abc.ABCAn abstract class representing an expected causal effect.
- abstract apply(res: causal_testing.testing.causal_test_result.CausalTestResult) bool
Abstract apply method that should return a bool representing if the result meets the outcome :param res: CausalTestResult to be checked :return: Bool that is true if outcome is met
- __str__() str
Return str(self).
- class causal_testing.testing.causal_effect.SomeEffect
Bases:
CausalEffectAn extension of CausalEffect representing that the expected causal effect should not be zero.
- apply(res: causal_testing.testing.causal_test_result.CausalTestResult) bool
Abstract apply method that should return a bool representing if the result meets the outcome :param res: CausalTestResult to be checked :return: Bool that is true if outcome is met
- class causal_testing.testing.causal_effect.NoEffect(atol: float = 1e-10, ctol: float = 0.05)
Bases:
CausalEffectAn extension of CausalEffect representing that the expected causal effect should be zero. :param atol: Arithmetic tolerance. The test will pass if the absolute value of the causal effect is less than atol. :param ctol: Categorical tolerance. The test will pass if this proportion of categories pass.
- apply(res: causal_testing.testing.causal_test_result.CausalTestResult) bool
Abstract apply method that should return a bool representing if the result meets the outcome :param res: CausalTestResult to be checked :return: Bool that is true if outcome is met
- class causal_testing.testing.causal_effect.ExactValue(value: float, atol: float = None, ci_low: float = None, ci_high: float = None)
Bases:
CausalEffectAn extension of CausalEffect representing that the expected causal effect should be a specific value.
- apply(res: causal_testing.testing.causal_test_result.CausalTestResult) bool
Abstract apply method that should return a bool representing if the result meets the outcome :param res: CausalTestResult to be checked :return: Bool that is true if outcome is met
- __str__()
Return str(self).
- class causal_testing.testing.causal_effect.Positive
Bases:
SomeEffectAn extension of CausalEffect representing that the expected causal effect should be positive. Currently only single values are supported for the test value
- apply(res: causal_testing.testing.causal_test_result.CausalTestResult) bool
Abstract apply method that should return a bool representing if the result meets the outcome :param res: CausalTestResult to be checked :return: Bool that is true if outcome is met
- class causal_testing.testing.causal_effect.Negative
Bases:
SomeEffectAn extension of CausalEffect representing that the expected causal effect should be negative. Currently only single values are supported for the test value
- apply(res: causal_testing.testing.causal_test_result.CausalTestResult) bool
Abstract apply method that should return a bool representing if the result meets the outcome :param res: CausalTestResult to be checked :return: Bool that is true if outcome is met