试图学习r-Caret和caretList.我正在尝试遵循教程caretEnsemble Classification示例
我遇到了一些错误并搜索了如何修复一些基本设置.但是,我收到错误:
Warning messages:
1: In train.default(x, y, weights = w, ...) :
The metric "Accuracy" was not in the result set. ROC will be used instead.
2: In train.default(x, y, weights = w, ...) :
The metric "Accuracy" was not in the result set. ROC will be used instead.
Run Code Online (Sandbox Code Playgroud)
我的设置是:
#Libraries
library(caret)
library(devtools)
library(caretEnsemble)
#Data
library(mlbench)
dat <- mlbench.xor(500, 2)
X <- data.frame(dat$x)
Y <- factor(ifelse(dat$classes=='1', 'Yes', 'No'))
#Split train/test
train <- runif(nrow(X)) <= .66
#Setup CV …Run Code Online (Sandbox Code Playgroud)