I\'m trying to predict the class (0 or 1) for a test dataset using a neural network trained using the neuralnet package in R.
The data I have looks as follows:
I had the same problem. I put debugonce(neuralnet) and I discovered neuralnet was multiplying matrix from different sizes.
debugonce(neuralnet)
I solved the problem removing the y column from test with this function
columns <- c("x1","x2","x3","x4") covariate <- subset(test, select = columns)