user1153308
user1153308

Reputation: 119

Pattern recognition in Neural Network using matlab simulation

I am new to this neural network in matlab. I wanted to create a Neural Network using matlab simulation.

This matlab simulation is using pattern recognition. I am running on a windows XP platform.

For example, I have a sets of waveforms of circular shape. I have extracted out the poles. These poles will teach my Neural Network that it is circular in shape, hence whenever I input another set of slightly different circular shape waveform, the Neural Network is able to distinguish between the shape.

Currently, I have extracted the poles of these 3 shapes, cylinder, circle and rectangle. But I am clueless of how I should go about creating my Neural Network.

Upvotes: 1

Views: 2263

Answers (2)

Simo Erkinheimo
Simo Erkinheimo

Reputation: 1397

I'd recommend utilizing SOM (Self-organizing map) for pattern recognition since it's really robust. Also there's a Som Toolbox for Matlab you might be interested in. However, to make it learn waves while neglecting their offsets, you'd need to make some changes to the "similarity function". These changes will affect quite a lot on the SOM's training time but if that's not a problem, keep reading.

For the SOM you'll have to sample your waves to constant sized vectors, let say:

  • sin x -> sin_vector = (a1, a2, a3, ..., aN)
  • cos x -> cos_vector = (b1, b2, b3, ..., bN)

Usually similarity of "SOM-vectors" is calculated with euclidian distance. Euclidian distance of those two vectors is huge since they have a different offset. In your case they should be considered to be similar ie. distance to be small. So.. if you don't sample all the similar waves from the same starting point, they will be classified in different classes. That is probably a problem. But! Similarity of vectors in SOM is calculated in order to find the BMU (best-matching unit) from the map and pulling the BMU's and its neigborhood's vectors torwards the values of the given sample. So all you need to change is the way to compare those vectors and the way to pull the vectors' values torwards the sample so that both will be "offset-tolerent".

Slow but working solution is first finding the best offset index for each vector. Best offset index is the one that will produce the smallest value with euclidian distance for the sample. Smallest distance calculated with some node of the net will then be the BMU. Then the BMU's and its neigborhood's vectors are pulled torwards the given sample using the offset index calculated for each node just before. Everything else should work out-of-the-box.

This solution is relatively slow but should work great. I'd recommend studying the consept of SOM thoroughly and then reading this post (and angry comments) again :)

PLEASE comment if you know some mathematical solution that would be better than that previous one!

Upvotes: 1

wan
wan

Reputation: 141

You can try to use Matlab's Neural network pattern recognition tool nprtool as it is specialize to train and test neural network for pattern recognition.

Upvotes: 0

Related Questions