本文介绍了关于 R 溢出的插入符号“无法找到变量“乐观启动""错误信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在 R 上测试 caret 以测试神经网络功能.当我运行下面的脚本时,它工作正常,这已经开始输出无法找到变量optimismBoot".

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
)

为什么?

[environment]
Windows 10 64bit
R 3.4.1
RStudio

推荐答案

此问题是一个插入符缺陷,已在 2017 年 9 月 11 日发布的插入符中修复.使用 devtools::install_github('topepo/caret/pkg/caret') 安装 github 版本的 caret.

This issue is a caret defect that was repaired in the September 11, 2017 release of caret. Install the github version of caret with devtools::install_github('topepo/caret/pkg/caret').

有关详细信息,请参阅 caret github 站点上的 issue #706.

See issue #706 on the caret github site for details.

问候,

这篇关于关于 R 溢出的插入符号“无法找到变量“乐观启动""错误信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 17:14