@@ -117,7 +117,7 @@ def fit(self, *args, inference=None, **kwargs):
117
117
self
118
118
119
119
"""
120
- pass
120
+ raise NotImplementedError ( "Abstract method" )
121
121
122
122
def _wrap_fit (m ):
123
123
@wraps (m )
@@ -160,7 +160,7 @@ def effect(self, X=None, *, T0, T1):
160
160
Note that when Y is a vector rather than a 2-dimensional array, the corresponding
161
161
singleton dimension will be collapsed (so this method will return a vector)
162
162
"""
163
- pass
163
+ raise NotImplementedError ( "Abstract method" )
164
164
165
165
@abc .abstractmethod
166
166
def marginal_effect (self , T , X = None ):
@@ -185,7 +185,7 @@ def marginal_effect(self, T, X=None):
185
185
the corresponding singleton dimensions in the output will be collapsed
186
186
(e.g. if both are vectors, then the output of this method will also be a vector)
187
187
"""
188
- pass
188
+ raise NotImplementedError ( "Abstract method" )
189
189
190
190
def ate (self , X = None , * , T0 , T1 ):
191
191
"""
@@ -355,7 +355,7 @@ def effect_interval(self, X=None, *, T0=0, T1=1, alpha=0.05):
355
355
lower, upper : tuple(type of :meth:`effect(X, T0, T1)<effect>`, type of :meth:`effect(X, T0, T1))<effect>` )
356
356
The lower and the upper bounds of the confidence interval for each quantity.
357
357
"""
358
- pass
358
+ raise NotImplementedError ( "Defer to inference" )
359
359
360
360
@_defer_to_inference
361
361
def effect_inference (self , X = None , * , T0 = 0 , T1 = 1 ):
@@ -379,7 +379,7 @@ def effect_inference(self, X=None, *, T0=0, T1=1):
379
379
can on demand calculate confidence interval, z statistic and p value. It can also output
380
380
a dataframe summary of these inference results.
381
381
"""
382
- pass
382
+ raise NotImplementedError ( "Defer to inference" )
383
383
384
384
@_defer_to_inference
385
385
def marginal_effect_interval (self , T , X = None , * , alpha = 0.05 ):
@@ -403,7 +403,7 @@ def marginal_effect_interval(self, T, X=None, *, alpha=0.05):
403
403
type of :meth:`marginal_effect(T, X)<marginal_effect>` )
404
404
The lower and the upper bounds of the confidence interval for each quantity.
405
405
"""
406
- pass
406
+ raise NotImplementedError ( "Defer to inference" )
407
407
408
408
@_defer_to_inference
409
409
def marginal_effect_inference (self , T , X = None ):
@@ -425,7 +425,7 @@ def marginal_effect_inference(self, T, X=None):
425
425
can on demand calculate confidence interval, z statistic and p value. It can also output
426
426
a dataframe summary of these inference results.
427
427
"""
428
- pass
428
+ raise NotImplementedError ( "Defer to inference" )
429
429
430
430
@_defer_to_inference
431
431
def ate_interval (self , X = None , * , T0 , T1 , alpha = 0.05 ):
@@ -450,7 +450,7 @@ def ate_interval(self, X=None, *, T0, T1, alpha=0.05):
450
450
lower, upper : tuple(type of :meth:`ate(X, T0, T1)<ate>`, type of :meth:`ate(X, T0, T1))<ate>` )
451
451
The lower and the upper bounds of the confidence interval for each quantity.
452
452
"""
453
- pass
453
+ raise NotImplementedError ( "Defer to inference" )
454
454
455
455
@_defer_to_inference
456
456
def ate_inference (self , X = None , * , T0 , T1 ):
@@ -474,7 +474,7 @@ def ate_inference(self, X=None, *, T0, T1):
474
474
can on demand calculate confidence interval, z statistic and p value. It can also output
475
475
a dataframe summary of these inference results.
476
476
"""
477
- pass
477
+ raise NotImplementedError ( "Defer to inference" )
478
478
479
479
@_defer_to_inference
480
480
def marginal_ate_interval (self , T , X = None , * , alpha = 0.05 ):
@@ -498,7 +498,7 @@ def marginal_ate_interval(self, T, X=None, *, alpha=0.05):
498
498
type of :meth:`marginal_ate(T, X)<marginal_ate>` )
499
499
The lower and the upper bounds of the confidence interval for each quantity.
500
500
"""
501
- pass
501
+ raise NotImplementedError ( "Defer to inference" )
502
502
503
503
@_defer_to_inference
504
504
def marginal_ate_inference (self , T , X = None ):
@@ -520,7 +520,7 @@ def marginal_ate_inference(self, T, X=None):
520
520
can on demand calculate confidence interval, z statistic and p value. It can also output
521
521
a dataframe summary of these inference results.
522
522
"""
523
- pass
523
+ raise NotImplementedError ( "Defer to inference" )
524
524
525
525
@property
526
526
def dowhy (self ):
@@ -564,7 +564,7 @@ def const_marginal_effect(self, X=None):
564
564
rather than a 2-dimensional array, the corresponding singleton dimensions in the output will be collapsed
565
565
(e.g. if both are vectors, then the output of this method will also be a vector)
566
566
"""
567
- pass
567
+ raise NotImplementedError ( "Abstract method" )
568
568
569
569
def effect (self , X = None , * , T0 , T1 ):
570
570
"""
@@ -697,7 +697,7 @@ def const_marginal_effect_interval(self, X=None, *, alpha=0.05):
697
697
type of :meth:`const_marginal_effect(X)<const_marginal_effect>` )
698
698
The lower and the upper bounds of the confidence interval for each quantity.
699
699
"""
700
- pass
700
+ raise NotImplementedError ( "Defer to inference" )
701
701
702
702
@BaseCateEstimator ._defer_to_inference
703
703
def const_marginal_effect_inference (self , X = None ):
@@ -717,7 +717,7 @@ def const_marginal_effect_inference(self, X=None):
717
717
can on demand calculate confidence interval, z statistic and p value. It can also output
718
718
a dataframe summary of these inference results.
719
719
"""
720
- pass
720
+ raise NotImplementedError ( "Defer to inference" )
721
721
722
722
def const_marginal_ate (self , X = None ):
723
723
"""
@@ -759,7 +759,7 @@ def const_marginal_ate_interval(self, X=None, *, alpha=0.05):
759
759
type of :meth:`const_marginal_ate(X)<const_marginal_ate>` )
760
760
The lower and the upper bounds of the confidence interval for each quantity.
761
761
"""
762
- pass
762
+ raise NotImplementedError ( "Defer to inference" )
763
763
764
764
@BaseCateEstimator ._defer_to_inference
765
765
def const_marginal_ate_inference (self , X = None ):
@@ -779,20 +779,19 @@ def const_marginal_ate_inference(self, X=None):
779
779
can on demand calculate confidence interval, z statistic and p value. It can also output
780
780
a dataframe summary of these inference results.
781
781
"""
782
- pass
783
782
784
783
def marginal_ate (self , T , X = None ):
785
784
return np .mean (self .marginal_effect (T , X = X ), axis = 0 )
786
785
marginal_ate .__doc__ = BaseCateEstimator .marginal_ate .__doc__
787
786
788
787
@BaseCateEstimator ._defer_to_inference
789
788
def marginal_ate_interval (self , T , X = None , * , alpha = 0.05 ):
790
- pass
789
+ raise NotImplementedError ( "Defer to inference" )
791
790
marginal_ate_interval .__doc__ = BaseCateEstimator .marginal_ate_interval .__doc__
792
791
793
792
@BaseCateEstimator ._defer_to_inference
794
793
def marginal_ate_inference (self , T , X = None ):
795
- pass
794
+ raise NotImplementedError ( "Defer to inference" )
796
795
marginal_ate_inference .__doc__ = BaseCateEstimator .marginal_ate_inference .__doc__
797
796
798
797
def shap_values (self , X , * , feature_names = None , treatment_names = None , output_names = None , background_samples = 100 ):
@@ -1003,7 +1002,7 @@ def coef__interval(self, *, alpha=0.05):
1003
1002
lb, ub: tuple(type of :meth:`coef_()<coef_>`, type of :meth:`coef_()<coef_>`)
1004
1003
The lower and upper bounds of the confidence interval for each quantity.
1005
1004
"""
1006
- pass
1005
+ raise NotImplementedError ( "Defer to inference" )
1007
1006
1008
1007
@BaseCateEstimator ._defer_to_inference
1009
1008
def coef__inference (self ):
@@ -1015,7 +1014,7 @@ def coef__inference(self):
1015
1014
InferenceResults: object
1016
1015
The inference of the coefficients in the final linear model
1017
1016
"""
1018
- pass
1017
+ raise NotImplementedError ( "Defer to inference" )
1019
1018
1020
1019
@BaseCateEstimator ._defer_to_inference
1021
1020
def intercept__interval (self , * , alpha = 0.05 ):
@@ -1033,7 +1032,7 @@ def intercept__interval(self, *, alpha=0.05):
1033
1032
lower, upper: tuple(type of :meth:`intercept_()<intercept_>`, type of :meth:`intercept_()<intercept_>`)
1034
1033
The lower and upper bounds of the confidence interval.
1035
1034
"""
1036
- pass
1035
+ raise NotImplementedError ( "Defer to inference" )
1037
1036
1038
1037
@BaseCateEstimator ._defer_to_inference
1039
1038
def intercept__inference (self ):
@@ -1045,7 +1044,7 @@ def intercept__inference(self):
1045
1044
InferenceResults: object
1046
1045
The inference of the intercept in the final linear model
1047
1046
"""
1048
- pass
1047
+ raise NotImplementedError ( "Defer to inference" )
1049
1048
1050
1049
def summary (self , alpha = 0.05 , value = 0 , decimals = 3 , feature_names = None , treatment_names = None , output_names = None ):
1051
1050
""" The summary of coefficient and intercept in the linear model of the constant marginal treatment
@@ -1274,7 +1273,7 @@ def coef__interval(self, T, *, alpha=0.05):
1274
1273
lower, upper: tuple(type of :meth:`coef_(T)<coef_>`, type of :meth:`coef_(T)<coef_>`)
1275
1274
The lower and upper bounds of the confidence interval for each quantity.
1276
1275
"""
1277
- pass
1276
+ raise NotImplementedError ( "Defer to inference" )
1278
1277
1279
1278
@BaseCateEstimator ._defer_to_inference
1280
1279
def coef__inference (self , T ):
@@ -1291,7 +1290,7 @@ def coef__inference(self, T):
1291
1290
InferenceResults: object
1292
1291
The inference of the coefficients in the final linear model
1293
1292
"""
1294
- pass
1293
+ raise NotImplementedError ( "Defer to inference" )
1295
1294
1296
1295
@BaseCateEstimator ._defer_to_inference
1297
1296
def intercept__interval (self , T , * , alpha = 0.05 ):
@@ -1311,7 +1310,7 @@ def intercept__interval(self, T, *, alpha=0.05):
1311
1310
lower, upper: tuple(type of :meth:`intercept_(T)<intercept_>`, type of :meth:`intercept_(T)<intercept_>`)
1312
1311
The lower and upper bounds of the confidence interval.
1313
1312
"""
1314
- pass
1313
+ raise NotImplementedError ( "Defer to inference" )
1315
1314
1316
1315
@BaseCateEstimator ._defer_to_inference
1317
1316
def intercept__inference (self , T ):
@@ -1329,7 +1328,7 @@ def intercept__inference(self, T):
1329
1328
The inference of the intercept in the final linear model
1330
1329
1331
1330
"""
1332
- pass
1331
+ raise NotImplementedError ( "Defer to inference" )
1333
1332
1334
1333
def summary (self , T , * , alpha = 0.05 , value = 0 , decimals = 3 ,
1335
1334
feature_names = None , treatment_names = None , output_names = None ):
0 commit comments