Pattern recognition by neural networks, using binary data sparse matrices
4 views (last 30 days)
Show older comments
My neural network has to learn to output yes or no, based on the occurrence of particular groups in the input. There are 21 groups, so a given group is represented by twenty '0's and one '1'. The position of the '1' indicates the group. Three groups are presented to the network at any time, so a single input is a 63x1 vector with sixty '0's and three '1's.
Currently my network adjusts a 63x1 weight matrix for each neuron. I think I am forcing it to learn too much (slightly pointless) information though. What I would like is for the network to only learn information about the position of the '1's, about the presence not the absence of a group. That is, I only want it to adjust three weights at a time, and if it sees a zero I want it to read "do nothing to that position's associated weights".
Does anyone know a way I could implement a design like this? I tried using a sparse matrix as the input but it doesn't seem to make a difference. Is it possible to put an if condition on the adjustment of weights?
Thank you for any thoughts.
0 Comments
Accepted Answer
Greg Heath
on 13 Apr 2013
The design is straightforward. Just train using a 63xN dim input matrix and a 21xN dim target matrix.
However, N needs to be large. The complete input space contains 21^3 vectors. I don't know how many you need in the training set to get good performance on nontraining data.
Hope this helps.
Thank you for formally accepting my answer
Greg
0 Comments
More Answers (2)
Greg Heath
on 17 Apr 2013
There are 21 ways to choose each of the 3 groups. Therefore, there are 21^3 possible inputs. If there can be no duplicates this reduces to 21*20*19. Now you can choose your N inputs from one of these two pools.
The 21 X N output matrix contains a count {0,1,2,3} of how many input vectors are from each group.
You could use a more condensed 5-bit binary coding for each group and have a 15XN input matrix.
Hope this helps.
Thank you for formally accepting my answer
Greg
0 Comments
See Also
Categories
Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!