@@ -492,6 +492,10 @@ def test_doubleml_exception_learner():
492
492
with pytest .warns (UserWarning , match = msg ):
493
493
_ = DoubleMLPLR (dml_data , ml_l = Lasso (), ml_m = ml_m , score = 'IV-type' )
494
494
495
+ msg = 'A learner ml_g has been provided for score = "partialling out" but will be ignored.'
496
+ with pytest .warns (UserWarning , match = msg ):
497
+ _ = DoubleMLPLR (dml_data , ml_l = Lasso (), ml_m = Lasso (), ml_g = Lasso (), score = 'partialling out' )
498
+
495
499
msg = 'ml_g was renamed to ml_l'
496
500
with pytest .warns (DeprecationWarning , match = msg ):
497
501
_ = DoubleMLPLIV (dml_data_pliv , ml_g = Lasso (), ml_m = ml_m , ml_r = ml_r ) # pylint: disable=no-value-for-parameter
@@ -501,6 +505,10 @@ def test_doubleml_exception_learner():
501
505
_ = DoubleMLPLIV (dml_data_pliv , ml_l = ml_l , ml_m = ml_m , ml_r = ml_r ,
502
506
score = 'IV-type' )
503
507
508
+ msg = 'A learner ml_g has been provided for score = "partialling out" but will be ignored.'
509
+ with pytest .warns (UserWarning , match = msg ):
510
+ _ = DoubleMLPLIV (dml_data_pliv , ml_l = Lasso (), ml_m = Lasso (), ml_r = Lasso (), ml_g = Lasso (), score = 'partialling out' )
511
+
504
512
# we allow classifiers for ml_g for binary treatment variables in IRM
505
513
msg = (r'The ml_g learner LogisticRegression\(\) was identified as classifier '
506
514
'but the outcome variable is not binary with values 0 and 1.' )
0 commit comments