user2742742
user2742742

Reputation: 11

Caret - Train does not provide Accuracy SD to nnet model output

I am trying to train neural network model using the function "train" in "caret" package. But it gives a lot of warnings and does not show the accuracy SD. I am not sure if I have to set any parameters so that I can see the Accuracy SD.

I am relatively new to R so please excuse me if I am missing on something that is obvious.

Here is my code:

library("caret", lib.loc="~/R/win-library/3.3")
set.seed(1056)
nnetFit <- train(Label ~., data = Train_2.4.16,
                 method = "nnet",
                 preProc = c("center", "scale"),
                 tuneLength = 5,
                 trControl = trainControl(method = "repeatedcv",
                                      repeats = 5))
nnetFit

Below is a sample of the warnings that I get on executing the code:

49: In eval(expr, envir, enclos) : model fit failed for Fold10.Rep1: size=9, decay=1e-03 Error in nnet.default(x, y, w, softmax = TRUE, ...) : too many (1049) weights

50: In eval(expr, envir, enclos) : model fit failed for Fold10.Rep1: size=9, decay=1e-04 Error in nnet.default(x, y, w, softmax = TRUE, ...) : too many (1049) weights*

The output of the code lists the neural network size, the decay, the Accuracy and Kappa.

I would also appreciate it if you can help me understand what is the decay and the kappa.

Upvotes: 0

Views: 565

Answers (1)

topepo
topepo

Reputation: 14331

You need to adjust the MaxNWts argument to the nnet function. Can can pass that argument to train and it will get to nnet.

Upvotes: 0

Related Questions