@@ -40,16 +40,16 @@ class Estimator(ABC):
40
40
"""
41
41
42
42
def __init__ (
43
- # pylint: disable=too-many-arguments
44
- self ,
45
- treatment : str ,
46
- treatment_value : float ,
47
- control_value : float ,
48
- adjustment_set : set ,
49
- outcome : str ,
50
- df : pd .DataFrame = None ,
51
- effect_modifiers : dict [str :Any ] = None ,
52
- alpha : float = 0.05 ,
43
+ # pylint: disable=too-many-arguments
44
+ self ,
45
+ treatment : str ,
46
+ treatment_value : float ,
47
+ control_value : float ,
48
+ adjustment_set : set ,
49
+ outcome : str ,
50
+ df : pd .DataFrame = None ,
51
+ effect_modifiers : dict [str :Any ] = None ,
52
+ alpha : float = 0.05 ,
53
53
):
54
54
self .treatment = treatment
55
55
self .treatment_value = treatment_value
@@ -90,16 +90,16 @@ class LogisticRegressionEstimator(Estimator):
90
90
"""
91
91
92
92
def __init__ (
93
- # pylint: disable=too-many-arguments
94
- self ,
95
- treatment : str ,
96
- treatment_value : float ,
97
- control_value : float ,
98
- adjustment_set : set ,
99
- outcome : str ,
100
- df : pd .DataFrame = None ,
101
- effect_modifiers : dict [str :Any ] = None ,
102
- formula : str = None ,
93
+ # pylint: disable=too-many-arguments
94
+ self ,
95
+ treatment : str ,
96
+ treatment_value : float ,
97
+ control_value : float ,
98
+ adjustment_set : set ,
99
+ outcome : str ,
100
+ df : pd .DataFrame = None ,
101
+ effect_modifiers : dict [str :Any ] = None ,
102
+ formula : str = None ,
103
103
):
104
104
super ().__init__ (treatment , treatment_value , control_value , adjustment_set , outcome , df , effect_modifiers )
105
105
@@ -162,7 +162,7 @@ def estimate(self, data: pd.DataFrame, adjustment_config: dict = None) -> Regres
162
162
return model .predict (x )
163
163
164
164
def estimate_control_treatment (
165
- self , adjustment_config : dict = None , bootstrap_size : int = 100
165
+ self , adjustment_config : dict = None , bootstrap_size : int = 100
166
166
) -> tuple [pd .Series , pd .Series ]:
167
167
"""Estimate the outcomes under control and treatment.
168
168
@@ -280,17 +280,17 @@ class LinearRegressionEstimator(Estimator):
280
280
"""
281
281
282
282
def __init__ (
283
- # pylint: disable=too-many-arguments
284
- self ,
285
- treatment : str ,
286
- treatment_value : float ,
287
- control_value : float ,
288
- adjustment_set : set ,
289
- outcome : str ,
290
- df : pd .DataFrame = None ,
291
- effect_modifiers : dict [Variable :Any ] = None ,
292
- formula : str = None ,
293
- alpha : float = 0.05 ,
283
+ # pylint: disable=too-many-arguments
284
+ self ,
285
+ treatment : str ,
286
+ treatment_value : float ,
287
+ control_value : float ,
288
+ adjustment_set : set ,
289
+ outcome : str ,
290
+ df : pd .DataFrame = None ,
291
+ effect_modifiers : dict [Variable :Any ] = None ,
292
+ formula : str = None ,
293
+ alpha : float = 0.05 ,
294
294
):
295
295
super ().__init__ (
296
296
treatment , treatment_value , control_value , adjustment_set , outcome , df , effect_modifiers , alpha = alpha
@@ -445,19 +445,19 @@ class CubicSplineRegressionEstimator(LinearRegressionEstimator):
445
445
"""
446
446
447
447
def __init__ (
448
- # pylint: disable=too-many-arguments
449
- self ,
450
- treatment : str ,
451
- treatment_value : float ,
452
- control_value : float ,
453
- adjustment_set : set ,
454
- outcome : str ,
455
- basis : int ,
456
- df : pd .DataFrame = None ,
457
- effect_modifiers : dict [Variable :Any ] = None ,
458
- formula : str = None ,
459
- alpha : float = 0.05 ,
460
- expected_relationship = None ,
448
+ # pylint: disable=too-many-arguments
449
+ self ,
450
+ treatment : str ,
451
+ treatment_value : float ,
452
+ control_value : float ,
453
+ adjustment_set : set ,
454
+ outcome : str ,
455
+ basis : int ,
456
+ df : pd .DataFrame = None ,
457
+ effect_modifiers : dict [Variable :Any ] = None ,
458
+ formula : str = None ,
459
+ alpha : float = 0.05 ,
460
+ expected_relationship = None ,
461
461
):
462
462
super ().__init__ (
463
463
treatment , treatment_value , control_value , adjustment_set , outcome , df , effect_modifiers , formula , alpha
@@ -497,17 +497,17 @@ class InstrumentalVariableEstimator(Estimator):
497
497
"""
498
498
499
499
def __init__ (
500
- # pylint: disable=too-many-arguments
501
- self ,
502
- treatment : str ,
503
- treatment_value : float ,
504
- control_value : float ,
505
- adjustment_set : set ,
506
- outcome : str ,
507
- instrument : str ,
508
- df : pd .DataFrame = None ,
509
- intercept : int = 1 ,
510
- effect_modifiers : dict = None , # Not used (yet?). Needed for compatibility
500
+ # pylint: disable=too-many-arguments
501
+ self ,
502
+ treatment : str ,
503
+ treatment_value : float ,
504
+ control_value : float ,
505
+ adjustment_set : set ,
506
+ outcome : str ,
507
+ instrument : str ,
508
+ df : pd .DataFrame = None ,
509
+ intercept : int = 1 ,
510
+ effect_modifiers : dict = None , # Not used (yet?). Needed for compatibility
511
511
):
512
512
super ().__init__ (treatment , treatment_value , control_value , adjustment_set , outcome , df , None )
513
513
self .intercept = intercept
0 commit comments