mlr-org / mlr3learners

Recommended learners for mlr3
https://mlr3learners.mlr-org.com
GNU Lesser General Public License v3.0
89 stars 14 forks source link

xgb classif and regr early stopping #219

Closed statist-bhfz closed 2 years ago

statist-bhfz commented 2 years ago

My second attempt to solve mlr-org/mlr3tuning#216 for xgboost inspired by https://github.com/mlr-org/mlr3extralearners/blob/main/R/learner_lightgbm_classif_lightgbm.R Short test provided in gists: https://gist.github.com/statist-bhfz/2151c26107c8922a344b7004fe64f26a https://gist.github.com/statist-bhfz/bc7661b9bbf5c6f2e9d3fd72f7b17d1a I faced with very strange behavior if only factor features are provided (illustrated in https://gist.github.com/statist-bhfz/bc7661b9bbf5c6f2e9d3fd72f7b17d1a). It looks like new feature names after encoding and other preprocessing steps doesn't propagate inside task object referred in learner, so only features with unchanged names actually take part in learning.

statist-bhfz commented 2 years ago

I realised that we can't process validation data during training phase, so will rely on hotstart_forward.