Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R-package] Fix demos not using lgb.Dataset.create.valid #1993

Merged
merged 4 commits into from
Feb 4, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Hand edit broken commit
  • Loading branch information
Laurae2 authored Feb 3, 2019
commit 3c791946627972eb6f1aff5560dc27e7ac2b5808
5 changes: 3 additions & 2 deletions R-package/demo/categorical_features_rules.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ my_data_test <- as.matrix(bank_test[, 1:16, with = FALSE])
# The categorical features can be passed to lgb.train to not copy and paste a lot
dtrain <- lgb.Dataset(data = my_data_train,
label = bank_train$y)
dtest <- lgb.Dataset(data = my_data_test,
label = bank_test$y)
dtest <- lgb.Dataset.create.valid(dtrain,
data = my_data_test,
label = bank_test$y)

# We can now train a model
model <- lgb.train(list(objective = "binary",
Expand Down