title: AMORE - Neural network training "with teacher" for two input variables
body: <p>I have very silly problem, but it is still a problem.
  I wanted to train a neural network with two input data sets "P1", "P2" and "T" as a result.
  I know how do this thing if there is only "x1" but I can't manage it with two variables. Here is my code, it draws a 3d plot of input data (x1,x2,y) but only 2d plot of output data. I hope I've explained it correctly. </p>
  
  <pre><code>library(AMORE)
  
  P1 &lt;- Dane02[,1]
  P2 &lt;- Dane02[,2]
  T &lt;- Dane02[,3]
  
  target &lt;- T    
  
  net &lt;- newff(n.neurons=c(2,20,10,1), learning.rate.global=0.01,
               momentum.global=0.01, error.criterium="LMS", 
               Stao=NA, hidden.layer="tansig", 
               output.layer="purelin", method="ADAPTgdwm")
  
  result &lt;- train(net, P1, P2, target, error.criterium="LMS", 
                  report=TRUE, show.step=100, n.shows=100 )
  
  y &lt;- sim(result$net, P1, P2)
  
  library(rgl)
  plot3d(P1,P2,target)
  points3d(P1,P2,y, col="red")
  </code></pre>
  
  <p>As it is shown on picture below, it looks like it is training the network thinking that "P2" is target. Am I correct? How can I correct it? <img src="https://i.stack.imgur.com/HQL9O.jpg" alt="Shoot from two different angles. You see red plot is flat"></p>
  
  <p>Result after corrects:
  <img src="https://i.stack.imgur.com/qs8Mo.jpg" alt="Result"></p>