How to increase train features in a neural network classifier???
3 次查看(过去 30 天)
显示 更早的评论
Sir, I am training 1 by 256 feature values,but i can train only 2 rows like that (i.e one row of 256 column values and the next row of 256 column values)..When i entered the third row a error war throwing out...
The below is my error: Error using network/subsasgn>network_subsasgn (line 528) net.IW{1,1} must be a 2-by-256 matrix.
Error in network/subsasgn (line 13) net = network_subsasgn(net,subscripts,v,netname);
Error in newpnn>create_network (line 122) net.iw{1,1} = p';
Error in newpnn (line 66) net = create_network(param);
Error in grad3D1 (line 47) net = newpnn(Trainfeature',T,spread);
My coding is: load flow.mat load Trainfeature load Truelabel
T = ind2vec(Truelabel'); spread=1; net = newpnn(Trainfeature',T,spread); Y = net(testfeature'); output = vec2ind(Y);
if output==2 % Trainfeature == Testfeature; h1 = msgbox('Fire Detected','ALERT'); %else %output==1 %h1 = msgbox('Fire Not Detected','ALERT'); end
0 个评论
采纳的回答
Greg Heath
2015-4-9
编辑:Greg Heath
2015-4-9
Oh, Wait a minute! You are using NEWPNN which uses all of the data for training.
I recommend using NEWRBF instead.
To separate N I-dimensional examples into c classes, the target matrix columns should be columns of eye(c) and
size(input) = [ I N ]
size(target) = [ c N ]
with
N >> max(I,c)
If you standardize your inputs and outputs then
zx = zscore(input',1)';
zt = zscore(target',1)';
MSEgoal = 0.01
spread ~ 1
usually works for both NEWRB and NEWPNN..
Search the NEWSGROUP and ANSWERS for some of my examples.
greg newpnn
greg newrb
Hope this helps.
Thank you for formally accepting my answer
Greg
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!