@@ -281,17 +281,6 @@ def _check_data(self, obj_dml_data):
281281 'use DoubleMLPLR instead of DoubleMLPLIV.' )
282282 return
283283
284- # To be removed in version 0.6.0
285- def set_ml_nuisance_params (self , learner , treat_var , params ):
286- if isinstance (self .score , str ) & (self .score == 'partialling out' ) & (learner == 'ml_g' ):
287- warnings .warn (("Learner ml_g was renamed to ml_l. "
288- "Please adapt the argument learner accordingly. "
289- "The provided parameters are set for ml_l. "
290- "The redirection will be removed in a future version." ),
291- DeprecationWarning , stacklevel = 2 )
292- learner = 'ml_l'
293- super (DoubleMLPLIV , self ).set_ml_nuisance_params (learner , treat_var , params )
294-
295284 def _nuisance_est (self , smpls , n_jobs_cv , return_models = False ):
296285 if self .partialX & (not self .partialZ ):
297286 psi_elements , preds = self ._nuisance_est_partial_x (smpls , n_jobs_cv , return_models )
@@ -523,41 +512,6 @@ def _nuisance_est_partial_xz(self, smpls, n_jobs_cv, return_models=False):
523512
524513 return psi_elements , preds
525514
526- # To be removed in version 0.6.0
527- def tune (self ,
528- param_grids ,
529- tune_on_folds = False ,
530- scoring_methods = None , # if None the estimator's score method is used
531- n_folds_tune = 5 ,
532- search_mode = 'grid_search' ,
533- n_iter_randomized_search = 100 ,
534- n_jobs_cv = None ,
535- set_as_params = True ,
536- return_tune_res = False ):
537-
538- if isinstance (self .score , str ) and (self .score == 'partialling out' ) and (param_grids is not None ) and \
539- ('ml_g' in param_grids ) and ('ml_l' not in param_grids ):
540- warnings .warn (("Learner ml_g was renamed to ml_l. "
541- "Please adapt the key of param_grids accordingly. "
542- "The provided param_grids for ml_g are set for ml_l. "
543- "The redirection will be removed in a future version." ),
544- DeprecationWarning , stacklevel = 2 )
545- param_grids ['ml_l' ] = param_grids .pop ('ml_g' )
546-
547- if isinstance (self .score , str ) and (self .score == 'partialling out' ) and (scoring_methods is not None ) and \
548- ('ml_g' in scoring_methods ) and ('ml_l' not in scoring_methods ):
549- warnings .warn (("Learner ml_g was renamed to ml_l. "
550- "Please adapt the key of scoring_methods accordingly. "
551- "The provided scoring_methods for ml_g are set for ml_l. "
552- "The redirection will be removed in a future version." ),
553- DeprecationWarning , stacklevel = 2 )
554- scoring_methods ['ml_l' ] = scoring_methods .pop ('ml_g' )
555-
556- tune_res = super (DoubleMLPLIV , self ).tune (param_grids , tune_on_folds , scoring_methods , n_folds_tune ,
557- search_mode , n_iter_randomized_search , n_jobs_cv , set_as_params ,
558- return_tune_res )
559- return tune_res
560-
561515 def _nuisance_tuning_partial_x (self , smpls , param_grids , scoring_methods , n_folds_tune , n_jobs_cv ,
562516 search_mode , n_iter_randomized_search ):
563517 x , y = check_X_y (self ._dml_data .x , self ._dml_data .y ,
0 commit comments