DoubleML / doubleml-for-r

DoubleML - Double Machine Learning in R
https://docs.doubleml.org
Other
123 stars 25 forks source link

Unit test for the extraction of predictions fails for non-glmnet learner #138

Closed MalteKurz closed 2 years ago

MalteKurz commented 2 years ago

If one replaces the learner in the unit test https://github.com/DoubleML/doubleml-for-r/blob/master/tests/testthat/test-double_ml_plr_export_preds.R with something else than "regr.cv_glmnet" it fails. Even for "regr.lm". The cross-validated glmnet seems to go through because it produces constant predictions in each fold.

MalteKurz commented 2 years ago

The root cause is that Xnames was never assigned in the unit test. https://github.com/DoubleML/doubleml-for-r/blob/52301d21516eaa25939cc7dd6246073174f142af/tests/testthat/test-double_ml_plr_export_preds.R#L34-L54