R报错:[LightGBM] [Warning] Contains only one class[LightGBM] [Warning] Stopped training because there
[LightGBM] [Warning] Contains only one class
[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements
[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements
[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements
[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements
[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements
这个是为什么呢?
```r
lgb_train <- lgb.Dataset(
data = as.matrix(train_data[, -which(names(train_data) == "critical")]),
label = train_data$outcome
)
params <- list(
objective = "binary",
metric = "auc",
boosting_type = "gbdt",
num_leaves = 31,
learning_rate = 0.05,
feature_fraction = 0.9
)
model <- lgb.train(
params,
lgb_train,
nrounds = 100,
verbose = 0
)