".github/workflows/no_response.yml" did not exist on "45a60a729986fb85eb2be2c6900f2da22e526034"
Unverified Commit d4629727 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[R-package] introduce Dataset methods set_field() and get_field() (#4571)



* [R-package] introduce Dataset set_field() and get_field()

* fix incorrect fields

* update pkgdown

* fix example

* fix another example

* Apply suggestions from code review
Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>

* update docs
Co-authored-by: default avatarNikita Titov <nekit94-08@mail.ru>
parent 74c7904b
......@@ -11,10 +11,10 @@ test_that("lgb.plot.interepretation works as expected for binary classification"
data(agaricus.train, package = "lightgbm")
train <- agaricus.train
dtrain <- lgb.Dataset(train$data, label = train$label)
setinfo(
set_field(
dataset = dtrain
, "init_score"
, rep(
, field_name = "init_score"
, data = rep(
.logit(mean(train$label))
, length(train$label)
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment