Skip to content

Commit 780f686

Browse files
committed
Removed TestOutome mentions
1 parent 5316c59 commit 780f686

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

causal_testing/testing/causal_effect.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def __str__(self) -> str:
2424

2525

2626
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."""
2828

2929
def apply(self, res: CausalTestResult) -> bool:
3030
if res.ci_low() is None or res.ci_high() is None:
@@ -38,11 +38,11 @@ def apply(self, res: CausalTestResult) -> bool:
3838
0 < ci_low < ci_high or ci_low < ci_high < 0 for ci_low, ci_high in zip(res.ci_low(), res.ci_high())
3939
)
4040

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")
4242

4343

4444
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."""
4646

4747
def __init__(self, atol: float = 1e-10, ctol: float = 0.05):
4848
"""
@@ -70,11 +70,11 @@ def apply(self, res: CausalTestResult) -> bool:
7070
< self.ctol
7171
)
7272

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")
7474

7575

7676
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."""
7878

7979
def __init__(self, value: float, atol: float = None, ci_low: float = None, ci_high: float = None):
8080
if (ci_low is not None) ^ (ci_high is not None):
@@ -110,7 +110,7 @@ def __str__(self):
110110

111111

112112
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.
114114
Currently only single values are supported for the test value"""
115115

116116
def apply(self, res: CausalTestResult) -> bool:
@@ -122,11 +122,11 @@ def apply(self, res: CausalTestResult) -> bool:
122122
return bool(res.test_value.value[0] > 0)
123123
if res.test_value.type == "risk_ratio":
124124
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")
126126

127127

128128
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.
130130
Currently only single values are supported for the test value"""
131131

132132
def apply(self, res: CausalTestResult) -> bool:
@@ -139,4 +139,4 @@ def apply(self, res: CausalTestResult) -> bool:
139139
if res.test_value.type == "risk_ratio":
140140
return bool(res.test_value.value[0] < 1)
141141
# 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

Comments
 (0)