1

I have the same problem as what is mentioned in Why does prediction using nn.predict in deepnet package in R return constant value? But the solution given for that question does not work for me. All my predictors and target values are normalized and there is no Nan values in the input matrices. Here is an example

PDay=matrix(runif(126140*5),126140,5)
TDay=apply(PDay,1,sum)*3.5;
TDay=matrix(TDay,length(TDay),1);TDay=TDay/max(TDay)
output_DBN=dbn.dnn.train(PDay, TDay, hidden = c(30,20,10))
Ytrain_DBN=nn.predict(output_DBN, PDay)

I have no idea why the predictions are values close to 0.51, no matter what are the values for predictors. Any help would be appreciated. Thanks.

Community
  • 1
  • 1
Nile
  • 303
  • 2
  • 11
  • I tried your code, I get 20% error. `error <- nn.test(output_DBN, PDay, TDay )`. I think the reason that the predictions are around 0.5 is because the mean and median of the set are 0.5. Try to use MNIST data set to get more meaningful results. http://stackoverflow.com/a/37863371/4670887 – Amin Jun 16 '16 at 16:16

0 Answers0