使用火车的插入错误:"出了点问题;缺少所有RMSE指标值"

时间:2015-06-01 10:09:28

标签: r neural-network r-caret nnet

我尝试使用R中的Caret包训练神经网络模型,并遇到有关缺少RMSE度量值的错误消息。有没有人遇到过这个错误?

以下是我的代码示例和收到的错误消息:

install.packages("caret")
library(caret)
ctrl <- trainControl(method = "timeslice", initialWindow = 8000, horizon = 2000, 
                     fixedWindow = TRUE)

install.packages("nnet")
library(nnet)
system.time({lmFiltered4 <- train(fgdDataTAvg2TrainXD, fgdDataTAvg2TrainY,
                     method = "avNNet",
                     size = 10, 
                     decay = 0.1,
                     trControl = ctrl,
                     preProc = c("center", "scale"),
                     linout = TRUE,
                     trace = FALSE,
                     MaxNWts = 10 * (ncol(fgdDataTAvg2TrainXD) +1) + 10 + 1,
                     maxit = 500)})


Something is wrong; all the RMSE metric values are missing:
      RMSE        Rsquared  
 Min.   : NA   Min.   : NA  
 1st Qu.: NA   1st Qu.: NA  
 Median : NA   Median : NA  
 Mean   :NaN   Mean   :NaN  
 3rd Qu.: NA   3rd Qu.: NA  
 Max.   : NA   Max.   : NA  
 NA's   :9     NA's   :9    
Error in train.default(fgdDataTAvg2TrainXD, fgdDataTAvg2TrainY, size = 10,  : 
  Stopping
In addition: Warning message:
In nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo,  :
  There were missing values in resampled performance measures.
Timing stopped at: 23461.03 69670.62 6671.223 

1 个答案:

答案 0 :(得分:2)

尝试删除可选参数并检查。例如,删除“lineout”