Skip to content

[R-package] Random Forest crash #691

Description

@Laurae2

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions