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] Random Forest crash #691

Closed
Laurae2 opened this issue Jul 14, 2017 · 1 comment
Labels

Comments

@Laurae2
Copy link
Collaborator

@Laurae2 Laurae2 commented Jul 14, 2017

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)
@guolinke

This comment has been minimized.

Copy link
Member

@guolinke guolinke commented Jul 14, 2017

it is designed for this. it will throw a fatal error .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.