I have been testing caret
on R to test neural network features.
As I run the script below, it was working correctly, this has been starting outputting "unable to find variable "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
)
Why?
[environment]
Windows 10 64bit
R 3.4.1
RStudio
I did not get this problem resolved by reverting to R version 3.3.3. Also, my other computer has R 3.4.0 installed which has no problem with caret. Strange voodoo... ... Update: The problem could involve the package snow. Switching off parallelization (unloading the doParallel package) resolved the problem for me.