r - 使用火车时出现插入符错误 : "Something is wrong; all the RMSE metric values are missing"

标签 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 

最佳答案

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

关于r - 使用火车时出现插入符错误 : "Something is wrong; all the RMSE metric values are missing",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30570757/

相关文章:

r - R中的findCorrelation函数

r - 为什么我的逻辑回归模型输出不是 2 个水平的因子? (错误: `data` and `reference` should be factors with the same levels.)

r - 数据表错误 "maxn (N) is not exact multiple of this j column' s长度(J)"

neural-network - 神经网络如何处理感兴趣区域较小的大图像?

r - 如何从R中的confusionMatrix检索整体精度值?

python - 神经网络中预测数据的反规范化

optimization - 如何使用pytorch找到最大化神经网络输出的输入

r - 使用 R 中的 read.table 按日期分解百分位数据

R:PDF格式的位图输出

R - 时间序列每小时