Random Forest mode in R crashes the R session when bagging_fraction or feature_fraction are 1.
library(lightgbm)
data(agaricus.train, package = "lightgbm")
train <- agaricus.train
dtrain <- lgb.Dataset(train$data, label = train$label)
data(agaricus.test, package = "lightgbm")
test <- agaricus.test
dtest <- lgb.Dataset.create.valid(dtrain, test$data, label = test$label)
params <- list(objective = "regression", metric = "l2", boosting_type = "rf", bagging_freq = 1, bagging_fraction = 0.632, feature_fraction = 0.632, boosting_type = "rf")
# params <- list(objective = "regression", metric = "l2", boosting_type = "rf", bagging_freq = 1, bagging_fraction = 0.632, boosting_type = "rf") # Crash
# params <- list(objective = "regression", metric = "l2", boosting_type = "rf", bagging_freq = 1, boosting_type = "rf") # Crash
valids <- list(test = dtest)
model <- lgb.train(params,
dtrain,
100,
valids,
min_data = 1,
learning_rate = 1,
early_stopping_rounds = 10)
Random Forest mode in R crashes the R session when
bagging_fractionorfeature_fractionare 1.