我有一些 r/caret 代码可以将多个交叉验证模型与某些数据相匹配,但我收到一条警告消息,提示我无法找到任何相关信息。这是我应该关心的事情吗?
library(datasets)
library(caret)
library(caretEnsemble)
# load data
data("iris")
# establish cross-validation structure
set.seed(32)
trainControl <- trainControl(method="repeatedcv", number=5, repeats=3, savePredictions=TRUE, search="random")
# fit several (cross-validated) models
algorithmList <- c('lda', # Linear Discriminant Analysis
'rpart' , # Classification and Regression Trees
'svmRadial') # SVM with RBF Kernel
models <- caretList(Species~., data=iris, trControl=trainControl, methodList=algorithmList)
日志输出:
Warning messages:
1: In trControlCheck(x = trControl, y = target) :
x$savePredictions == TRUE is depreciated. Setting to 'final' instead.
2: In trControlCheck(x = trControl, y = target) :
indexes not defined in trControl. Attempting to set them ourselves, so each model in the ensemble will have the same resampling indexes.
...我认为我的 trainControl 对象定义了一个交叉验证结构(3x 5 折交叉验证)将为 cv 拆分生成一组索引。所以我很困惑为什么我会收到这个消息。