2
$\begingroup$

First I'm not sure if this is the right place to post my question, but I saw some questions about ANN, and I assumed I can ask it here. I have implemented an ANN with back-propagation. I'm using it for Wi-Fi based indoor localization using fingerprinting. I saw many papers achieving accuracy below 2 m, so I hoped for such results but I didn't get it. My network is composed of input layer, 2 hidden layers, and output layer. The input layer has 14 neurons, each hidden layer has 8 neurons, and the output layer has 1 neuron. My sample space that I used to train the network is composed of 630 sample.

I trained the network using different configurations for the learning rate and training iterations. I didn't achieve any good results at all. The average accuracy I achieved was 24 m, which is really bad.

My questions: 1. How can I verify whether the problem is in my code or my ANN design? 2. How to improve on the design to get better results? 3. How to choose which learning rate to start with and how many iterations for training?

This is my first time dealing with ANN, and I didn't find any clear guidelines of how to design it.

$\endgroup$
1
$\begingroup$

In order to verify your back-propagation implementation you could compare your results to that achieved with a know correct back-propagation implementation.

I can recommend FANN (fast artificial neutral networks) as a cross platform open source implementation of back-propagation. http://leenissen.dk/fann/wp/. Though I'm sure the Matlab implimention is also very good if you have access to it.

As for training iterations you could use early stopping methods rather than keep varying the number of epochs http://page.mi.fu-berlin.de/prechelt/Biblio/stop_tricks1997.pdf.

As for the topology of the network. This question has been asked previously: How to choose the number of hidden layers and nodes in a feedforward neural network?

As for the learning rate you might need to do a little trial and error :)

Hope this helps.

$\endgroup$
  • $\begingroup$ Thanks a lot for your help. Regarding your first point, how can I compare my results to a known correct back propagation? $\endgroup$ – Alaa Nov 21 '14 at 17:34
  • $\begingroup$ Use the same training set on your implementation and the FANN implementation and see if your performance is similar to that of FANN. You might need to do it a few times and take an average. $\endgroup$ – Andy T Nov 21 '14 at 18:58
0
$\begingroup$

To verify if you have trained your neural net correctly you can start by feeding the same input that you have used to train the network.

Eg. Training data Input 1:70 will have Output 1:70 After you have trained your network use the same input instead of your training/test data and see if you get the same output. This is a good way to detect overfitting, if you feed in data that your network has never seen before and it performs badly.

Hope it helps! Good luck.

$\endgroup$
  • $\begingroup$ What I did was that I used the same set of data for training the network and for testing it. The accuracy of the tests was in the range of 7 meters to 28 m in for different parameters. Does this means that there is something wrong with code? $\endgroup$ – Alaa Dec 7 '14 at 12:45
  • $\begingroup$ I believe there is something wrong. A properly 'trained' neural net should have very small error. 7-28 is a lot. Have you tried normalizing your data to the same scale? Alternatively you can try other training algorithm such as extreme learning machine. It does not require normalizing and gives small training error (to verify your net is trained correctly). However overfitting occurs in elm as well. $\endgroup$ – user62106 Dec 7 '14 at 13:17
  • $\begingroup$ I got that results when the data was normalized to the same scale. When you said there is something wrong, did you mean the code is incorrect? $\endgroup$ – Alaa Dec 9 '14 at 9:11
  • $\begingroup$ It is very difficult to tell if your code is incorrect. What software are you using? $\endgroup$ – user62106 Dec 13 '14 at 9:33
  • $\begingroup$ when I try few number of training samples it learns them, it doesn't produce an exact output but very close to it. But when I use the full training samples set the average error is large, I really can't figure out why $\endgroup$ – Alaa Dec 13 '14 at 18:02

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.