From 5256cda69300d6b83b18180da2992a1e50a6b392 Mon Sep 17 00:00:00 2001 From: Laurae Date: Thu, 7 Feb 2019 01:06:32 +0100 Subject: [PATCH] Fix #1988 missing file issue (#2000) --- R-package/demo/categorical_features_rules.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R-package/demo/categorical_features_rules.R b/R-package/demo/categorical_features_rules.R index 6ac2eb1ce58..27504022842 100644 --- a/R-package/demo/categorical_features_rules.R +++ b/R-package/demo/categorical_features_rules.R @@ -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) @@ -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))