neural net - undefined column selected
I have several factor variables so I decided to use dummy variables instead for ANN.
set.seed(222) m <- model.matrix( ~price+month+year+area+larea+otype+cid+rid+did+renovation+nrooms+nbeds+nbaths+nbalcs+wfloor+status, data = data) ind <- sample(2, nrow(m), replace = TRUE, prob = c(0.8, 0.2)) training <- m[ind==1,] testing <- m[ind==2,]
n <- neuralnet(price~., data = training, hidden = 1, err.fct = "sse", linear.output = FALSE)
[.data.frame(data, , model.list$variables) : undefined columns selected
I use dot because I have 94 explanatory variables. when I run price on two explanatory variables to see what the problem was it worked. There is some problem with dot, is it only used for linear regression and I got it wrong? how can I solve this problem?