title: Neuralnet package in R gives wrong output
body: <p>I'm trying to generate prediction of the column "dubina" using this algorithm made in R's "neuralnet" package. But I keep getting non-reliable neural-net output. I have tried changing the number of hidden layers, normalizing and denormalizing data. Is there a mistake in the algorithm, maybe because of the activation function being logistic, not sigmoid?</p>
  
  <p>My dataset:
  <a href="http://www26.zippyshare.com/v/Nc2Sbuny/file.html" rel="nofollow">http://www26.zippyshare.com/v/Nc2Sbuny/file.html</a></p>
  
  <p>Here is the algorithm:</p>
  
  <pre><code>#Data input
  podatci&lt;-read.csv("rs5.csv", sep=";", header=T)
  
  #Division into train and test data
  smp_size &lt;- floor(0.75 * nrow(podatci))
  smp_size
  train_ind &lt;- sample(seq_len(nrow(podatci)), size = smp_size)
  train &lt;- podatci[train_ind, ]
  test &lt;- podatci[-train_ind, ]
  train
  
  #Normalization
  train_normal&lt;-(train-min(train))/(max(train)-min(train))
  test_normal&lt;-(test-min(test))/(max(test)-min(test))
  
  #Training of the network
  install.packages('neuralnet')
  library("neuralnet")
  
  n &lt;- names(train_normal)
  f &lt;- as.formula(paste("dubina ~", paste(n[!n %in% "dubina"], collapse =  " + ")))
  net_tr &lt;- neuralnet(f,data=train_normal,hidden=c(3,2),linear.output=T)
  
  plot(net_tr)
  
  #TESTing of the network
  
  pr.nn&lt;-compute(net_tr, test_normal[,1:2])
  ls(pr.nn)
  print(pr.nn$net.result)
  
  #Printing
  cleanoutput &lt;- cbind(test_normal, as.data.frame(pr.nn$net.result))
  colnames(cleanoutput) &lt;- c("x","y","dubina","Neural Net Output")
  print(cleanoutput)
  
  #Denormalization of output data
  denorm&lt;-(min(test) + cleanoutput* (max(test)-min(test)))
  denorm
  </code></pre>
  
  <p>Test sample (part of it, there are 743 data which are split 75/25)</p>
  
  <pre><code>          x       y dubina
  6   6451993 5057986      0
  7   6451993 5055986      0
  15  6447993 5063986      0
  17  6447993 5059986      0
  25  6445993 5059986      0
  27  6445993 5055986      0
  28  6443993 5073986   1980
  29  6443993 5071986   1910
  30  6443993 5069986   1700
  </code></pre>
  
  <p>Neural-net output:</p>
  
  <pre><code>          x       y dubina Neural Net Output
  6   6451993 5057986      0     3180.43153834
  7   6451993 5055986      0     3342.40866485
  15  6447993 5063986      0     2564.23694019
  17  6447993 5059986      0     2888.11216362
  25  6445993 5059986      0     2822.94367093
  27  6445993 5055986      0     3146.83988044
  28  6443993 5073986   1980     1624.49331419
  29  6443993 5071986   1910     1786.36349347
  30  6443993 5069986   1700     1948.24298143
  </code></pre>