Open nguyenngocbinh opened 3 years ago
library(mlr3) library(mlr3learners.lightgbm) task = mlr3::tsk("iris") learner = mlr3::lrn("classif.lightgbm", objective = "multiclass") learner$param_set$values = mlr3misc::insert_named( learner$param_set$values, list( "early_stopping_round" = 10, "learning_rate" = 0.1, "seed" = 17L, "metric" = "multi_logloss", "num_iterations" = 100, "num_class" = 3 ) ) learner$train(task, row_ids = 1:120) save(learner, task, file = "test_lightgbm.RData")
library(mlr3) library(mlr3learners.lightgbm) rm(list = ls()) load("test_lightgbm.RData") predictions = learner$predict(task, row_ids = 121:150) # Crash in this -----------
I restart Rstudio (press Ctrl + Shift + F10)
load library again