dts86
dts86

Reputation: 401

Caret Error Using Train: "Something is wrong; all the RMSE metric values are missing"

I'm trying to train a neural network model using the Caret package in R and encountered an error message regarding missing RMSE metric values. Has anyone come across this error before?

Below is a sample of my code and the error message received:

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 

Upvotes: 2

Views: 3301

Answers (1)

Hrishi
Hrishi

Reputation: 21

Try removing optional parameters and check. For example remove "lineout"

Upvotes: 2

Related Questions