我一直在测试caret
R 以测试神经网络功能。当我运行下面的脚本时,它工作正常,这已经开始输出“无法找到变量“optimismBoot”。
library(doParallel)
cl <- makePSOCKcluster(4)
registerDoParallel(cl)
library(caret)
m<-rbind(c(1,2,3),c(4,5,6),c(7,8,9))
train_data<-as.data.frame(m)
nnmodel <- train(
V3 ~ .,
data = train_data,
method = "nnet",
preProcess = c('center', 'scale'),
trControl = trainControl(method = "cv"),
tuneGrid = expand.grid(size=c(1:10), decay=seq(0.1, 1, 0.1)),
linout = T
)
为什么?
[environment]
Windows 10 64bit
R 3.4.1
RStudio