6. Learners, hyperparameters and hyperparameter tuning

The estimation of a double/debiased machine learning model involves the estimation of several nuisance function with machine learning estimators. Such learners are implemented in various Python and R packages. The implementation of DoubleML is based on the meta-packages scikit-learn for Python and mlr3 for R. The interfaces to specify the learners, set hyperparameters and tune hyperparameters are described in the following separately for Python and R.

6.1. Python: Learners and hyperparameters

6.1.1. Minimum requirements for learners

The minimum requirement for a learner to be used for nuisance models in the DoubleML package is

Most learners from scikit-learn satisfy all these minimum requirements.

6.1.2. Specifying learners and set hyperparameters

The learners are set during initialization of the DoubleML model classes doubleml.DoubleMLPLR, doubleml.DoubleMLPLIV, doubleml.DoubleMLIRM and doubleml.DoubleMLIIVM. Lets simulate some data and consider the partially linear regression model. We need to specify learners for the nuisance functions \(g_0(X) = E[Y|X]\) and \(m_0(X) = E[D|X]\), for example sklearn.ensemble.RandomForestRegressor.

In [1]: import doubleml as dml

In [2]: from doubleml.datasets import make_plr_CCDDHNR2018

In [3]: from sklearn.ensemble import RandomForestRegressor

In [4]: np.random.seed(1234)

In [5]: ml_g = RandomForestRegressor()

In [6]: ml_m = RandomForestRegressor()

In [7]: data = make_plr_CCDDHNR2018(alpha=0.5, return_type='DataFrame')

In [8]: obj_dml_data = dml.DoubleMLData(data, 'y', 'd')

In [9]: dml_plr_obj = dml.DoubleMLPLR(obj_dml_data, ml_g, ml_m)

In [10]: dml_plr_obj.fit().summary
Out[10]: 
       coef   std err         t         P>|t|     2.5 %    97.5 %
d  0.543694  0.044073  12.33621  5.781357e-35  0.457313  0.630076

Without further specification of the hyperparameters, default values are used. To set hyperparameters:

  • We can also use pre-parametrized learners, like RandomForestRegressor(n_estimators=10).

  • Alternatively, hyperparameters can also be set after initialization via the method set_ml_nuisance_params(learner, treat_var, params)

In [11]: np.random.seed(1234)

In [12]: dml_plr_obj = dml.DoubleMLPLR(obj_dml_data,
   ....:                               RandomForestRegressor(n_estimators=10),
   ....:                               RandomForestRegressor())
   ....: 

In [13]: print(dml_plr_obj.fit().summary)
       coef   std err         t         P>|t|     2.5 %    97.5 %
d  0.568324  0.042163  13.47916  2.074547e-41  0.485686  0.650962

In [14]: np.random.seed(1234)

In [15]: dml_plr_obj = dml.DoubleMLPLR(obj_dml_data,
   ....:                               RandomForestRegressor(),
   ....:                               RandomForestRegressor())
   ....: 

In [16]: dml_plr_obj.set_ml_nuisance_params('ml_g', 'd', {'n_estimators': 10});

In [17]: print(dml_plr_obj.fit().summary)
       coef   std err         t         P>|t|     2.5 %    97.5 %
d  0.568324  0.042163  13.47916  2.074547e-41  0.485686  0.650962

Setting treatment-variable-specific or fold-specific hyperparameters:

  • In the multiple-treatment case, the method set_ml_nuisance_params(learner, treat_var, params) can be used to set different hyperparameters for different treatment variables.

  • The method set_ml_nuisance_params(learner, treat_var, params) accepts dicts and lists for params. A dict should be provided if for each fold the same hyperparameters should be used. Fold-specific parameters are supported. To do so, provide a nested list as params, where the outer list is of length n_rep and the inner list of length n_folds.

6.1.3. Hyperparameter tuning

Parameter tuning of learners for the nuisance functions of DoubleML models can be done via the tune() method. To illustrate the parameter tuning, we generate data from a sparse partially linear regression model.

In [18]: import doubleml as dml

In [19]: import numpy as np

In [20]: np.random.seed(3141)

In [21]: n_obs = 200

In [22]: n_vars = 200

In [23]: theta = 3

In [24]: X = np.random.normal(size=(n_obs, n_vars))

In [25]: d = np.dot(X[:, :3], np.array([5, 5, 5])) + np.random.standard_normal(size=(n_obs,))

In [26]: y = theta * d + np.dot(X[:, :3], np.array([5, 5, 5])) + np.random.standard_normal(size=(n_obs,))

In [27]: dml_data = dml.DoubleMLData.from_arrays(X, y, d)

The hyperparameter-tuning is performed using either an exhaustive search over specified parameter values implemented in sklearn.model_selection.GridSearchCV or via a randomized search implemented in sklearn.model_selection.RandomizedSearchCV.

In [28]: import doubleml as dml

In [29]: from sklearn.linear_model import Lasso

In [30]: ml_g = Lasso()

In [31]: ml_m = Lasso()

In [32]: dml_plr_obj = dml.DoubleMLPLR(dml_data, ml_g, ml_m)

In [33]: par_grids = {'ml_g': {'alpha': np.arange(0.05, 1., 0.1)},
   ....:              'ml_m': {'alpha': np.arange(0.05, 1., 0.1)}}
   ....: 

In [34]: dml_plr_obj.tune(par_grids, search_mode='grid_search');

In [35]: print(dml_plr_obj.params)
{'ml_g': {'d': [[{'alpha': 0.45000000000000007}, {'alpha': 0.45000000000000007}, {'alpha': 0.45000000000000007}, {'alpha': 0.45000000000000007}, {'alpha': 0.45000000000000007}]]}, 'ml_m': {'d': [[{'alpha': 0.15000000000000002}, {'alpha': 0.15000000000000002}, {'alpha': 0.15000000000000002}, {'alpha': 0.15000000000000002}, {'alpha': 0.15000000000000002}]]}}

In [36]: print(dml_plr_obj.fit().summary)
       coef   std err          t  P>|t|     2.5 %    97.5 %
d  3.031134  0.071777  42.229759    0.0  2.890454  3.171815

In [37]: np.random.seed(1234)

In [38]: par_grids = {'ml_g': {'alpha': np.arange(0.05, 1., 0.01)},
   ....:              'ml_m': {'alpha': np.arange(0.05, 1., 0.01)}}
   ....: 

In [39]: dml_plr_obj.tune(par_grids, search_mode='randomized_search', n_iter_randomized_search=20);

In [40]: print(dml_plr_obj.params)
{'ml_g': {'d': [[{'alpha': 0.4000000000000001}, {'alpha': 0.4000000000000001}, {'alpha': 0.4000000000000001}, {'alpha': 0.4000000000000001}, {'alpha': 0.4000000000000001}]]}, 'ml_m': {'d': [[{'alpha': 0.09000000000000001}, {'alpha': 0.09000000000000001}, {'alpha': 0.09000000000000001}, {'alpha': 0.09000000000000001}, {'alpha': 0.09000000000000001}]]}}

In [41]: print(dml_plr_obj.fit().summary)
      coef   std err          t          P>|t|     2.5 %    97.5 %
d  2.96582  0.086679  34.216207  1.388216e-256  2.795932  3.135707

Hyperparameter tuning can also be done with more sophisticated methods, like for example an iterative fitting along a regularization path implemented in sklearn.linear_model.LassoCV. In this case the tuning should be done externally and the parameters can then be set via the set_ml_nuisance_params() method.

In [42]: import doubleml as dml

In [43]: from sklearn.linear_model import LassoCV

In [44]: np.random.seed(1234)

In [45]: ml_g_tune = LassoCV().fit(dml_data.x, dml_data.y)

In [46]: ml_m_tune = LassoCV().fit(dml_data.x, dml_data.d)

In [47]: ml_g = Lasso()

In [48]: ml_m = Lasso()

In [49]: dml_plr_obj = dml.DoubleMLPLR(dml_data, ml_g, ml_m)

In [50]: dml_plr_obj.set_ml_nuisance_params('ml_g', 'd', {'alpha': ml_g_tune.alpha_});

In [51]: dml_plr_obj.set_ml_nuisance_params('ml_m', 'd', {'alpha': ml_m_tune.alpha_});

In [52]: print(dml_plr_obj.params)
{'ml_g': {'d': [[{'alpha': 0.4311947070055128}, {'alpha': 0.4311947070055128}, {'alpha': 0.4311947070055128}, {'alpha': 0.4311947070055128}, {'alpha': 0.4311947070055128}]]}, 'ml_m': {'d': [[{'alpha': 0.14281403493938027}, {'alpha': 0.14281403493938027}, {'alpha': 0.14281403493938027}, {'alpha': 0.14281403493938027}, {'alpha': 0.14281403493938027}]]}}

In [53]: print(dml_plr_obj.fit().summary)
       coef   std err          t  P>|t|     2.5 %    97.5 %
d  3.048723  0.075869  40.183855    0.0  2.900021  3.197424

6.2. R: Learners and hyperparameters

6.2.1. Minimum requirements for learners

The minimum requirement for a learner to be used for nuisance models in the DoubleML package is

An interactive list of provided learners in the mlr3 and extension packages can be found on the website of the mlr3extralearners package.

6.2.2. Specifying learners and set hyperparameters

The learners are set during initialization of the DoubleML model classes DoubleML::DoubleMLPLR, DoubleML::DoubleMLPLIV , DoubleML::DoubleMLIRM and DoubleML::DoubleMLIIVM. Lets simulate some data and consider the partially linear regression model. We need to specify learners for the nuisance functions \(g_0(X) = E[Y|X]\) and \(m_0(X) = E[D|X]\), for example LearnerRegrRanger (lrn("regr.ranger")) for regression with random forests based on the ranger package for R.

library(DoubleML)
library(mlr3)
library(mlr3learners)
library(data.table)
lgr::get_logger("mlr3")$set_threshold("warn")

# set up a mlr3 learner
learner = lrn("regr.ranger")
ml_g = learner$clone()
ml_m = learner$clone()
set.seed(3141)
data = make_plr_CCDDHNR2018(alpha=0.5, return_type='data.table')
obj_dml_data = DoubleMLData$new(data, y_col="y", d_cols="d")
dml_plr_obj = DoubleMLPLR$new(obj_dml_data, ml_g, ml_m)
dml_plr_obj$fit()
dml_plr_obj$summary()
Estimates and significance testing of the effect of target variables
  Estimate. Std. Error t value Pr(>|t|)    
d   0.57505    0.04458    12.9   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


Without further specification of the hyperparameters, default values are used. To set hyperparameters:

  • We can also use pre-parametrized learners lrn("regr.ranger", num.trees=10).

  • Alternatively, hyperparameters can be set after initialization via the method set_ml_nuisance_params(learner, treat_var, params, set_fold_specific).

set.seed(3141)
ml_g = lrn("regr.ranger", num.trees=10)
ml_m = lrn("regr.ranger")
obj_dml_data = DoubleMLData$new(data, y_col="y", d_cols="d")
dml_plr_obj = DoubleMLPLR$new(obj_dml_data, ml_g, ml_m)
dml_plr_obj$fit()
dml_plr_obj$summary()

set.seed(3141)
ml_g = lrn("regr.ranger")
dml_plr_obj = DoubleMLPLR$new(obj_dml_data, ml_g , ml_m)
dml_plr_obj$set_ml_nuisance_params("ml_g", "d", list("num.trees"=10))
dml_plr_obj$fit()
dml_plr_obj$summary()
Estimates and significance testing of the effect of target variables
  Estimate. Std. Error t value Pr(>|t|)    
d   0.58765    0.04532   12.97   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


Estimates and significance testing of the effect of target variables
  Estimate. Std. Error t value Pr(>|t|)    
d   0.58765    0.04532   12.97   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


Setting treatment-variable-specific or fold-specific hyperparameters:

  • In the multiple-treatment case, the method set_ml_nuisance_params(learner, treat_var, params, set_fold_specific) can be used to set different hyperparameters for different treatment variables.

  • The method set_ml_nuisance_params(learner, treat_var, params, set_fold_specific) accepts lists for params. The structure of the list depends on whether the same parameters should be provided for all folds or separate values are passed for specific folds.

  • Global parameter passing: The values in params are used for estimation on all folds. The named list in the argument params should have entries with names corresponding to the parameters of the learners. It is required that option set_fold_specific is set to FALSE (default).

  • Fold-specific parameter passing: params is a nested list. The outer list needs to be of length n_rep and the inner list of length n_folds. The innermost list must have named entries that correspond to the parameters of the learner. It is required that option set_fold_specific is set to TRUE. Moreover, fold-specific parameter passing is only supported, if all parameters are set fold-specific.

  • External setting of parameters will override previously set parameters. To assert the choice of parameters, access the fields $learner and $params.

set.seed(3141)
ml_g = lrn("regr.ranger")
ml_m = lrn("regr.ranger")
obj_dml_data = DoubleMLData$new(data, y_col="y", d_cols="d")

n_rep = 2
n_folds = 3
dml_plr_obj = DoubleMLPLR$new(obj_dml_data, ml_g, ml_m, n_rep=n_rep, n_folds=n_folds)

# Set globally
params = list("num.trees"=10)
dml_plr_obj$set_ml_nuisance_params("ml_g", "d", params=params)
dml_plr_obj$set_ml_nuisance_params("ml_m", "d", params=params)
dml_plr_obj$learner
dml_plr_obj$params
dml_plr_obj$fit()
dml_plr_obj$summary()
$ml_g
<LearnerRegrRanger:regr.ranger>
* Model: -
* Parameters: num.threads=1
* Packages: ranger
* Predict Type: response
* Feature types: logical, integer, numeric, character, factor, ordered
* Properties: importance, oob_error, weights

$ml_m
<LearnerRegrRanger:regr.ranger>
* Model: -
* Parameters: num.threads=1
* Packages: ranger
* Predict Type: response
* Feature types: logical, integer, numeric, character, factor, ordered
* Properties: importance, oob_error, weights
$ml_g
$d = $num.trees = 10
$ml_m
$d = $num.trees = 10
Estimates and significance testing of the effect of target variables
  Estimate. Std. Error t value Pr(>|t|)    
d    0.5249     0.0459   11.43   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


The following example illustrates how to set parameters for each fold.

learner = lrn("regr.ranger")
ml_g = learner$clone()
ml_m = learner$clone()
dml_plr_obj = DoubleMLPLR$new(obj_dml_data, ml_g, ml_m, n_rep=n_rep, n_folds=n_folds)

# Set values for each fold
params_exact = rep(list(rep(list(params), n_folds)), n_rep)
dml_plr_obj$set_ml_nuisance_params("ml_g", "d", params=params_exact,
                                     set_fold_specific=TRUE)
dml_plr_obj$set_ml_nuisance_params("ml_m", "d", params=params_exact,
                                     set_fold_specific=TRUE)
dml_plr_obj$learner
dml_plr_obj$params
dml_plr_obj$fit()
dml_plr_obj$summary()
$ml_g
<LearnerRegrRanger:regr.ranger>
* Model: -
* Parameters: num.threads=1
* Packages: ranger
* Predict Type: response
* Feature types: logical, integer, numeric, character, factor, ordered
* Properties: importance, oob_error, weights

$ml_m
<LearnerRegrRanger:regr.ranger>
* Model: -
* Parameters: num.threads=1
* Packages: ranger
* Predict Type: response
* Feature types: logical, integer, numeric, character, factor, ordered
* Properties: importance, oob_error, weights
$ml_g
$d =
    1. $num.trees = 10
    2. $num.trees = 10
    3. $num.trees = 10
    1. $num.trees = 10
    2. $num.trees = 10
    3. $num.trees = 10
$ml_m
$d =
    1. $num.trees = 10
    2. $num.trees = 10
    3. $num.trees = 10
    1. $num.trees = 10
    2. $num.trees = 10
    3. $num.trees = 10
Estimates and significance testing of the effect of target variables
  Estimate. Std. Error t value Pr(>|t|)    
d   0.49098    0.04415   11.12   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


6.2.3. Hyperparameter tuning

Parameter tuning of learners for the nuisance functions of DoubleML models can be done via the tune() method. The tune() method passes various options and parameters to the tuning interface provided by the mlr3tuning package. The mlr3 book provides a step-by-step introduction to parameter tuning.

To illustrate the parameter tuning, we generate data from a sparse partially linear regression model.

library(DoubleML)
library(mlr3)
library(data.table)

set.seed(3141)
n_obs = 200
n_vars = 200
theta = 3
X = matrix(stats::rnorm(n_obs * n_vars), nrow = n_obs, ncol = n_vars)
d = X[, 1:3, drop = FALSE] %*% c(5, 5, 5) + stats::rnorm(n_obs)
y = theta * d + X[, 1:3, drop = FALSE] %*% c(5, 5, 5)  + stats::rnorm(n_obs)
dml_data = double_ml_data_from_matrix(X = X, y = y, d = d)

The hyperparameter-tuning is performed according to options passed through a named list tune_settings. The entries in the list specify options during parameter tuning with mlr3tuning:

  • terminator is a Terminator object passed to mlr3tuning that manages the budget to solve the tuning problem.

  • algorithm is an object of class Tuner and specifies the tuning algorithm. Alternatively, algorithm can be a character() that is used as an argument in the wrapper mlr3tuning call tnr(algorithm). The corresponding chapter in the mlr3book illustrates how the Tuner class supports grid search, random search, generalized simulated annealing and non-linear optimization.

  • rsmp_tune is an object of class mlr3 resampling that specifies the resampling method for evaluation, for example rsmp(“cv”, folds = 5) implements 5-fold cross-validation. rsmp(“holdout”, ratio = 0.8) implements an evaluation based on a hold-out sample that contains 20 percent of the observations. By default, 5-fold cross-validation is performed.

  • measure is a named list containing the measures used for tuning of the nuisance components. The names of the entries must match the learner names (see method learner_names()). The entries in the list must either be objects of class Measure or keys passed to msr(). If measure is not provided by the user, default measures are used, i.e., mean squared error for regression models and classification error for binary outcomes.

In the following example, we tune the penalty parameter \(\lambda\) (lambda) for lasso with the R package glmnet. To tune the value of lambda, a grid search is performed over a grid of values that range from 0.05 to 0.1 at a resolution of 10. Using a resolution of 10 splits the grid of values in 10 equally spaced values ranging from a minimum of 0.05 to a maximum of 0.1. To evaluate the predictive performance in both nuisance parts, the cross-validated mean squared error is used.

Setting the option tune_on_folds=FALSE, the tuning is performed on the whole sample. Hence, the cross-validated errors are obtained from a random split of the whole sample into 5 folds. As a result, one set of lambda values are obtained which are later used in the fitting stage for all folds.

Alternatively, setting the option tune_on_folds=TRUE would assign the tuning resampling scheme rsmp_tune to each fold. For example, if we set n_folds=2 at initialization of the DoubleMLPLR object and use a 5-fold cross-validated error for tuning, each of the two folds would be split up into 5 subfolds and the error would be evaluated on these subfolds.

library(DoubleML)
library(mlr3)
library(data.table)
library(mlr3learners)
library(mlr3tuning)
library(paradox)
lgr::get_logger("mlr3")$set_threshold("warn")
lgr::get_logger("bbotk")$set_threshold("warn")

set.seed(1234)
ml_g = lrn("regr.glmnet")
ml_m = lrn("regr.glmnet")
dml_plr_obj = DoubleMLPLR$new(dml_data, ml_g, ml_m)

par_grids = list("ml_g" = ParamSet$new(list(
                                  ParamDbl$new("lambda", lower = 0.05, upper = 0.1))),
                 "ml_m" =  ParamSet$new(list(
                                  ParamDbl$new("lambda", lower = 0.05, upper = 0.1))))

tune_settings = list(terminator = trm("evals", n_evals = 100),
                      algorithm = tnr("grid_search", resolution = 10),
                      rsmp_tune = rsmp("cv", folds = 5),
                      measure = list("ml_g" = msr("regr.mse"),
                                     "ml_m" = msr("regr.mse")))
dml_plr_obj$tune(param_set=par_grids, tune_settings=tune_settings, tune_on_fold=TRUE)
dml_plr_obj$params

dml_plr_obj$fit()
dml_plr_obj$summary()
$ml_g
$d =
    1. $family
      'gaussian'
      $lambda
      0.1
    2. $family
      'gaussian'
      $lambda
      0.0777777777777778
    3. $family
      'gaussian'
      $lambda
      0.1
    4. $family
      'gaussian'
      $lambda
      0.1
    5. $family
      'gaussian'
      $lambda
      0.1
$ml_m
$d =
    1. $family
      'gaussian'
      $lambda
      0.1
    2. $family
      'gaussian'
      $lambda
      0.1
    3. $family
      'gaussian'
      $lambda
      0.1
    4. $family
      'gaussian'
      $lambda
      0.1
    5. $family
      'gaussian'
      $lambda
      0.1
Estimates and significance testing of the effect of target variables
  Estimate. Std. Error t value Pr(>|t|)    
d    3.0425     0.1424   21.37   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


Hyperparameter tuning can also be done with more sophisticated methods, for example by using built-in tuning paths of learners. For example, the learner regr.cv_glmnet performs an internal cross-validated choice of the parameter lambda. Alternatively, the powerful functionalities of the mlr3tuning package can be used for external parameter tuning of the nuisance parts. The optimally chosen parameters can then be passed to the DoubleML models using the set_ml_nuisance_params() method.

library(DoubleML)
library(mlr3)
library(data.table)
library(mlr3learners)
library(mlr3tuning)
lgr::get_logger("mlr3")$set_threshold("warn")
lgr::get_logger("bbotk")$set_threshold("warn")

set.seed(1234)
ml_g = lrn("regr.cv_glmnet", s="lambda.min")
ml_m = lrn("regr.cv_glmnet", s="lambda.min")
dml_plr_obj = DoubleMLPLR$new(dml_data, ml_g, ml_m)

dml_plr_obj$fit()
dml_plr_obj$summary()
Estimates and significance testing of the effect of target variables
  Estimate. Std. Error t value Pr(>|t|)    
d   3.08848    0.07366   41.93   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


The following code chunk illustrates another example for global parameter tuning with random forests as provided by the ranger package. In this example, we use random search to find optimal parameters mtry and max.depth of a random forest. Evaluation is based on 3-fold cross-validation.

library(DoubleML)
library(mlr3)
library(mlr3learners)
library(data.table)
library(mlr3tuning)
library(paradox)
lgr::get_logger("mlr3")$set_threshold("warn")
lgr::get_logger("bbotk")$set_threshold("warn")

# set up a mlr3 learner
learner = lrn("regr.ranger")
ml_g = learner$clone()
ml_m = learner$clone()

set.seed(3141)
obj_dml_data = make_plr_CCDDHNR2018(alpha=0.5)
dml_plr_obj = DoubleMLPLR$new(obj_dml_data, ml_g, ml_m)

# set up a list of parameter grids
param_grid = list("ml_g" = ParamSet$new(list(
                                  ParamInt$new("mtry", lower = 2 , upper = 20),
                                  ParamInt$new("max.depth", lower = 2, upper = 5))),
                  "ml_m" = ParamSet$new(list(
                                  ParamInt$new("mtry", lower = 2 , upper = 20),
                                  ParamInt$new("max.depth", lower = 2, upper = 5))))
tune_settings = list(terminator = mlr3tuning::trm("evals", n_evals = 20),
                      algorithm = tnr("random_search"),
                      rsmp_tune = rsmp("cv", folds = 3),
                      measure = list("ml_g" = msr("regr.mse"),
                                     "ml_m" = msr("regr.mse")))
dml_plr_obj$tune(param_set=param_grid, tune_settings=tune_settings, tune_on_folds=FALSE)
dml_plr_obj$params

dml_plr_obj$fit()
dml_plr_obj$summary()
$ml_g
$d =
$num.threads
1
$mtry
10
$max.depth
5
$ml_m
$d =
$num.threads
1
$mtry
17
$max.depth
3
Estimates and significance testing of the effect of target variables
  Estimate. Std. Error t value Pr(>|t|)    
d   0.55348    0.04559   12.14   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


6.2.3.1. References

  • Lang, M., Binder, M., Richter, J., Schratz, P., Pfisterer, F., Coors, S., Au, Q., Casalicchio, G., Kotthoff, L., Bischl, B. (2019), mlr3: A modern object-oriented machine learing framework in R. Journal of Open Source Software, doi:10.21105/joss.01903.

  • Becker, M., Binder, M., Bischl, B., Lang, M., Pfisterer, F., Reich, N.G., Richter, J., Schratz, P., Sonabend, R. (2020), mlr3 book, available at https://mlr3book.mlr-org.com.