Predict Neuralnet


Hi, I am trying to predict the Neural Network with Compute statement with the Boston Data set. How ever, I am receiving an error message all the time.
My R Code is attached with the pdf file.
BostonNeuralnet.pdf (1.2 MB)

Compute Statement Error:

Boston.predictNN <- compute(nn, testNN.Boston[,6:14], rep = 1)

Error in neurons[[i]] %*% weights[[i]] : non-conformable arguments

Please advise.




See this example. sometimes neuralnet() function not accept formula y~.