@@ -24,7 +24,7 @@ def __str__(self) -> str:
24
24
25
25
26
26
class SomeEffect (CausalEffect ):
27
- """An extension of TestOutcome representing that the expected causal effect should not be zero."""
27
+ """An extension of CausalEffect representing that the expected causal effect should not be zero."""
28
28
29
29
def apply (self , res : CausalTestResult ) -> bool :
30
30
if res .ci_low () is None or res .ci_high () is None :
@@ -38,11 +38,11 @@ def apply(self, res: CausalTestResult) -> bool:
38
38
0 < ci_low < ci_high or ci_low < ci_high < 0 for ci_low , ci_high in zip (res .ci_low (), res .ci_high ())
39
39
)
40
40
41
- raise ValueError (f"Test Value type { res .test_value .type } is not valid for this TestOutcome " )
41
+ raise ValueError (f"Test Value type { res .test_value .type } is not valid for this CausalEffect " )
42
42
43
43
44
44
class NoEffect (CausalEffect ):
45
- """An extension of TestOutcome representing that the expected causal effect should be zero."""
45
+ """An extension of CausalEffect representing that the expected causal effect should be zero."""
46
46
47
47
def __init__ (self , atol : float = 1e-10 , ctol : float = 0.05 ):
48
48
"""
@@ -70,11 +70,11 @@ def apply(self, res: CausalTestResult) -> bool:
70
70
< self .ctol
71
71
)
72
72
73
- raise ValueError (f"Test Value type { res .test_value .type } is not valid for this TestOutcome " )
73
+ raise ValueError (f"Test Value type { res .test_value .type } is not valid for this CausalEffect " )
74
74
75
75
76
76
class ExactValue (CausalEffect ):
77
- """An extension of TestOutcome representing that the expected causal effect should be a specific value."""
77
+ """An extension of CausalEffect representing that the expected causal effect should be a specific value."""
78
78
79
79
def __init__ (self , value : float , atol : float = None , ci_low : float = None , ci_high : float = None ):
80
80
if (ci_low is not None ) ^ (ci_high is not None ):
@@ -110,7 +110,7 @@ def __str__(self):
110
110
111
111
112
112
class Positive (SomeEffect ):
113
- """An extension of TestOutcome representing that the expected causal effect should be positive.
113
+ """An extension of CausalEffect representing that the expected causal effect should be positive.
114
114
Currently only single values are supported for the test value"""
115
115
116
116
def apply (self , res : CausalTestResult ) -> bool :
@@ -122,11 +122,11 @@ def apply(self, res: CausalTestResult) -> bool:
122
122
return bool (res .test_value .value [0 ] > 0 )
123
123
if res .test_value .type == "risk_ratio" :
124
124
return bool (res .test_value .value [0 ] > 1 )
125
- raise ValueError (f"Test Value type { res .test_value .type } is not valid for this TestOutcome " )
125
+ raise ValueError (f"Test Value type { res .test_value .type } is not valid for this CausalEffect " )
126
126
127
127
128
128
class Negative (SomeEffect ):
129
- """An extension of TestOutcome representing that the expected causal effect should be negative.
129
+ """An extension of CausalEffect representing that the expected causal effect should be negative.
130
130
Currently only single values are supported for the test value"""
131
131
132
132
def apply (self , res : CausalTestResult ) -> bool :
@@ -139,4 +139,4 @@ def apply(self, res: CausalTestResult) -> bool:
139
139
if res .test_value .type == "risk_ratio" :
140
140
return bool (res .test_value .value [0 ] < 1 )
141
141
# Dead code but necessary for pylint
142
- raise ValueError (f"Test Value type { res .test_value .type } is not valid for this TestOutcome " )
142
+ raise ValueError (f"Test Value type { res .test_value .type } is not valid for this CausalEffect " )
0 commit comments