mlr3learners / mlr3learners.lightgbm

Learners from {lightgbm} for mlr3
GNU Lesser General Public License v2.1
9 stars 3 forks source link

Example Code fails with lightgbm 3.0 #8

Closed ThomasWolf0701 closed 4 years ago

ThomasWolf0701 commented 4 years ago

I ran the example code from you GitHub page and after trying to train the classifier:

learner$train(task, row_ids = 1:120)

I got the following error message:

Error in lightgbm::lgb.prepare(data) : lgb.prepare() was removed in LightGBM 3.0.0. Please use lgb.convert_with_rules()

ThomasWolf0701 commented 4 years ago

This seems to be the problem:

prepare data for lightgbm

  data = lightgbm::lgb.prepare(data)

Replacing with data = lightgbm::lgb.convert_with_rules(data) should fix this ?

statist-bhfz commented 4 years ago

https://github.com/mlr3learners/mlr3learners.lightgbm/pull/9

kapsner commented 4 years ago

fixed with https://github.com/mlr3learners/mlr3learners.lightgbm/commit/0d4dc329bffe057debebb8a1e684164ed291aa67