R Error in x - y : non-conformable arrays
r
Solution
I was just having the same issue and it appears to have been fixed when I removed any NANs from my predictors (or replaced them with some sane default value).
Problem
I'm trying to train a neural network in R with the following dataset (small part) ``` Age Salary Mortrate Clientrate Savrate PartialPrate [1,] 62 2381.140 0.047 7.05 3.1 0 [2,] 52 1777.970 0.047 6.10 3.1 0 [3,] 53 2701.210 0.047 6.40 3.1 0 [4,] 52 4039.460 0.047 7.00 3.1 0 [5,] 56 602.240 0.047 6.20 3.1 0 [6,] 43 2951.090 0.047 6.80 3.1 0 [7,] 49 4648.860 0.047 7.50 3.1 0 [8,] 44 3304.110 0.047 7.10 3.1 0 [9,] 56 1300.000 0.047 6.10 3.1 0 [10,] 50 1761.440 0.047 6.95 3.1 0 ``` If I try doing it for small set of data as above the code works, but if I take more data then the `neuralnet()` gives the error: ``` Neuralnet error Error in x - y : non-conformable arrays. ``` What does this error mean and how do I fix it? Code: ``` trainingsoutput <- AllData$PartialPrepay trainingdata <- cbind(AllData$LEEFTIJD, AllData$MEDSAL2, AllData$rate5Y, AllData$CRate, AllData$SavRate, trainingsoutput) dimnames(trainingdata) <- list(NULL, c("Age","Salary","Mortrate","Clientrate", "Savrate","PartialPrate")) nn <- neuralnet(PartialPrate ~ Age + Salary + Mortrate + Clientrate + Savrate, data = trainingdata ,hidden=3, err.fct="sse", threshold=0.01) ```