Skip to content
This repository has been archived by the owner on Jul 31, 2021. It is now read-only.

Commit

Permalink
fixed merge conflict in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kapsner committed Apr 4, 2020
1 parent a0db8fa commit c588db2
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ devtools::install_github("mlr3learners/mlr3learners.lightgbm")
```r
library(mlr3)
task = mlr3::tsk("iris")
<<<<<<< HEAD
learner = mlr3::lrn("classif.lightgbm", objective = "multiclass")

learner$param_set$values <- mlr3misc::insert_named(
learner$param_set$values = mlr3misc::insert_named(
learner$param_set$values,
list(
"early_stopping_round" = 10,
Expand All @@ -49,17 +48,6 @@ learner$param_set$values <- mlr3misc::insert_named(
"num_iterations" = 100,
"num_class" = 3
)
=======
learner = mlr3::lrn("classif.lightgbm")

learner$early_stopping_rounds = 1000
learner$num_boost_round = 5000

learner$param_set$values = list(
"objective" = "multiclass",
"learning_rate" = 0.01,
"seed" = 17L
>>>>>>> development
)

learner$train(task, row_ids = 1:120)
Expand All @@ -84,8 +72,7 @@ Rscript build_r.R
In order to use the GPU acceleration, the parameter `device_type = "gpu"` (default: "cpu") needs to be set. According to the [LightGBM parameter manual](https://lightgbm.readthedocs.io/en/latest/Parameters.html), 'it is recommended to use the smaller `max_bin` (e.g. 63) to get the better speed up'.

```r
<<<<<<< HEAD
learner$param_set$values <- mlr3misc::insert_named(
learner$param_set$values = mlr3misc::insert_named(
learner$param_set$values,
list(
"objective" = "multiclass",
Expand All @@ -99,15 +86,6 @@ learner$param_set$values <- mlr3misc::insert_named(
"num_class" = 3
)
)
=======
learner$param_set$values = list(
"objective" = "multiclass",
"learning_rate" = 0.01,
"seed" = 17L,
"device_type" = "gpu",
"max_bin" = 63L
)
>>>>>>> development
```

All other steps are similar to the workflow without GPU support.
Expand Down

1 comment on commit c588db2

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/zzz.R:14:29: warning: no visible binding for global variable ‘LearnerClassifLightGBM’

x$add("classif.lightgbm", LearnerClassifLightGBM)
                            ^~~~~~~~~~~~~~~~~~~~~~

R/zzz.R:15:26: warning: no visible binding for global variable ‘LearnerRegrLightGBM’

x$add("regr.lightgbm", LearnerRegrLightGBM)
                         ^~~~~~~~~~~~~~~~~~~

Please sign in to comment.