Effacer les filtres
Effacer les filtres

Neural Network tool box

3 vues (au cours des 30 derniers jours)
mamata
mamata le 17 Juin 2014
Commenté : Greg Heath le 8 Juil 2014
my pattern P size is 180*15 and target T size is 15*15.
Create a network : mynet=newff(P,T,[80],{'logsig' 'logsig'},'traingdx');
train it : mynet=train(mynet,P,T);
However I get different result at different time of executing the script. is it the nature of neural network???

Réponse acceptée

Greg Heath
Greg Heath le 17 Juin 2014
Default trn/val/tst data division and initial weights are random. To duplicate runs you have to initialize the RNG to the same initial state as before
help rng
doc rng
WARNING: YOUR PROBLEM IS VERY, VERY ILL-POSED
[ I N ] = size(P ) % [ 180 15 ]
[ O N ] = size(T) % [ 15 15 ]
Ntrn = N -2*round(0.15*N) % DEFAULT: 11 training (2 validation and 2 test) examples
Ntrneq = Ntrn*O % 165 training equations
H = 80 % 80 hidden nodes
Nw = (I+1)*H+(H+1)*O % 181*80+81*15 = 15,695 unknown weights
1. You are trying to define an I= 180 dimensional space with only Ntrn = 11 training examples. 11 examples define at most a 10 dimensional space. Even if you used all 15 examples for training, you could only define, at most, a 14 dimensional space.
2. It is desirable to have MANY MORE training examples than twice the dimensionality of the input space. SUGGESTION: Get more examples and/or reduce the dimensionality of your input by projecting your inputs onto a smaller dimensional basis.
3. You are seeking accurate estimates of 15,695 unknown weights with only 165 training equations.
4. Ideally
a. N >> I,O
b. Ntrneq >> Nw <==> H << Hub = -1+ceil((Ntrneq-O)/(I+O+1))
If you explain in more detail P,I, T and O, perhaps we can give you better advice and relevant references.
Hope this helps.
Thank you for formally accepting my answer
Greg
  2 commentaires
mamata
mamata le 18 Juin 2014
I have a pattern recognition problem. I use 15 different character of font size 12. for each generate a matrix of 280 * 1. So for 15 number of characters, Training file contain matrix of P 280*15. The target is an identity matrix of 15*15. Try to test the network by taking same fonts of size 12, 16 and 24, so it became 280*45 (Ptest). Q1. Is my approach is correct Create a network : mynet=newff(P,T,[80],{'logsig' 'logsig'},'traingdx'); train it : mynet=train(mynet,P,T); test it :output=mynet(Ptest); Q2. How to generate the confusion matrix
Please replay
Greg Heath
Greg Heath le 8 Juil 2014
Now you are trying to define a 280-dimensional space with 15 vectors.
Find a source on image feature extraction (e.g., search NEWSGROUP, ANSWERS and Google)
You are training with fontsize 12 and testing with fontsizes 16 and 24
Why use the obsolete newff instead of patternnet?
help patternnet
Why use logsig and traingdx instead of defaults?
help confusion
doc confusion
Hope this helps.
Greg

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by