@@ -65,8 +65,8 @@ def estimate_ate(self) -> (float, [float, float], float):
65
65
class PoissonWidthHeight (CausalTestOutcome ):
66
66
"""An extension of TestOutcome representing that the expected causal effect should be positive."""
67
67
68
- def __init__ (self , tolerance = 0.5 ):
69
- self .tolerance = tolerance
68
+ def __init__ (self , atol = 0.5 ):
69
+ self .atol = atol
70
70
self .i2c = None
71
71
72
72
def apply (self , res : CausalTestResult ) -> bool :
@@ -79,12 +79,12 @@ def apply(self, res: CausalTestResult) -> bool:
79
79
self .i2c = i * 2 * c
80
80
logger .info ("2ic: 2 * %s * %s = %s" , i , c , self .i2c )
81
81
logger .info ("ate: %s" , res .test_value .value )
82
- return np .isclose (res .test_value .value , self .i2c , atol = self .tolerance )
82
+ return np .isclose (res .test_value .value , self .i2c , atol = self .atol )
83
83
84
84
def __str__ (self ):
85
85
if self .i2c is None :
86
- return f"PoissonWidthHeight±{ self .tolerance } "
87
- return f"PoissonWidthHeight:{ self .i2c } ±{ self .tolerance } "
86
+ return f"PoissonWidthHeight±{ self .atol } "
87
+ return f"PoissonWidthHeight:{ self .i2c } ±{ self .atol } "
88
88
89
89
90
90
def populate_width_height (data ):
@@ -121,7 +121,7 @@ def populate_num_shapes_unit(data):
121
121
"PoissonWidthHeight" : PoissonWidthHeight (),
122
122
"Positive" : Positive (),
123
123
"Negative" : Negative (),
124
- "ExactValue4_05" : ExactValue (4 , tolerance = 0.5 ),
124
+ "ExactValue4_05" : ExactValue (4 , atol = 0.5 ),
125
125
"NoEffect" : NoEffect (),
126
126
}
127
127
0 commit comments