필터 지우기
필터 지우기

Neural Network tool box

조회 수: 1 (최근 30일)
mamata
mamata 2014년 6월 17일
댓글: Greg Heath 2014년 7월 8일
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???

채택된 답변

Greg Heath
Greg Heath 2014년 6월 17일
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
mamata
mamata 2014년 6월 18일
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 2014년 7월 8일
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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by