jianghong1992
代码是这样的:
fitControl <- trainControl(
method = "repeatedcv",
number = cv_fold,
repeats = cv_time,
classProbs = TRUE,
summaryFunction = twoClassSummary)
modelFit <- train(Y ~ ., data=clean_train_data,
method = 'gbm',
trControl = fitControl,
verbose = FALSE,
metric = mod_metrics)
出现错误:Error in train.default(x, y, weights = w, ...) :
final tuning parameters could not be determined
In addition: Warning messages:
1: In nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo, :
There were missing values in resampled performance measures.
2: In train.default(x, y, weights = w, ...) :
missing values found in aggregated results
说是tuning parameters有问题,可是我加上这段代码:
gbmGrid <- expand.grid(interaction.depth = c(1,5),
n.trees = 1:500,
shrinkage = 0.1
)
还是报相同的错误。哪位大神知道这是怎么回事情呢~~~