Skip to content

Commit

Permalink
Fix #1988 missing file issue (#2000)
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurae2 authored and guolinke committed Feb 7, 2019
1 parent 462612b commit 5256cda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R-package/demo/categorical_features_rules.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ my_data_test <- as.matrix(bank_test[, 1:16, with = FALSE])
# Creating the LightGBM dataset with categorical features
# 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)
label = bank_train$y,
categorical_feature = c(2, 3, 4, 5, 7, 8, 9, 11, 16))
dtest <- lgb.Dataset.create.valid(dtrain,
data = my_data_test,
label = bank_test$y)
Expand All @@ -81,8 +82,7 @@ model <- lgb.train(list(objective = "binary",
learning_rate = 0.1,
min_data = 0,
min_hessian = 1,
max_depth = 2,
categorical_feature = c(2, 3, 4, 5, 7, 8, 9, 11, 16)),
max_depth = 2),
dtrain,
100,
valids = list(train = dtrain, valid = dtest))
Expand Down

0 comments on commit 5256cda

Please sign in to comment.