Developing regression model using neuralnet package,I have checked that there is no NA
or NAN
values and also there are only predictors in the test data set.
n <- names(y[673:29952,])
f <- as.formula(paste("y[673:29952,]$x1 ~ ", paste(n[!n %in% "y[673:29952,]$x1"], collapse = " + ")))
nn1 <- neuralnet(f,data=y[673:29952,],hidden=5,linear.output=T)
pr.nn <- compute(nn1,y[29953:30432,2:8])
kindly help me to resolve it.