0

So I have something like this, y=l3*[sin(theta1)*cos(theta2)*cos(theta3)+cos(theta1)*sin(theta2)*cos(theta3)-sin(theta1)*sin(theta2)*sin(theta3)+cos(theta1)*cos(theta2)sin(theta3)]+l2[sin(theta1)*cos(theta2)+cos(theta1)*sin(theta2)]+l1*sin(theta1)+l0;

and something similar for x. Where thetai is angles from specified interval and li some coeficients. Task is approximate inversion of equation, so you set x and y and result will be appropriate theta. So I random generate thetas from specified intervals, compute x and y. Then I norm x and y between <-1,1> and thetas between <0,1>. This data I used as training set in such way, inputs of network are normalized x and y, outputs are normalized thetas.

I train the network, tried different configuration and absolute error of network was still around 24.9% after whole night of training. It's so much, so I don't know what to do.

  • Bigger training set?
  • Bigger network?
  • Experiment with learning rate?
  • Longer training?

Technical info

As training algorithm was used error back propagation. Neurons have sigmoid activation function, units are biased. I tried topology: [2 50 3], [2 100 50 3], training set has length 1000 and training duration was 1000 cycle(in one cycle I go through all dataset). Learning rate has value 0.2.

Error of approximation was computed as

sum of abs(desired_output - reached_output)/dataset_lenght.

Used optimizer is stochastic gradient descent.

Loss function,

1/2 (desired-reached)^2

Network was realized in my Matlab template for NN. I know that is weak point, but I'm sure my template is right because(successful solution of XOR problem, approximation of differential equations, approximation of state regulator). But I show this template, because this information may be useful.

Neuron class

Network class

EDIT: I used 2500 unique data within theta ranges.

theta1<0, 180>, theta2<-130, 130>, theta3<-150, 150>

I also experiment with larger dataset, but accuracy doesn't improve.

viceriel
  • 835
  • 12
  • 18
  • What is your loss function? And your optimizer? I would guess that you have little data for that monstruous function. Can you plot the 1000 data points you have againts the function? It will help deciding if you need more data or not... – J63 May 11 '17 at 09:26
  • My loss function is 1/2 (desired-reached)^2, optimizer is error back propagation as stochastic gradient descent form. Thank you for tip with plotting data, but I'm not sure how to reasonably plot, because I have 3 thetas for each output(x, y), so it will be 4D graph and also, I mentioned that I need approximate inversion of function so that will be 2 inputs and 3 outputs. – viceriel May 11 '17 at 10:12

0 Answers0