I DO NEED HELP, problem with number of neurons in hidden layer of feedforward neural network
3 views (last 30 days)
Show older comments
I do need some one to follow my code, i have attached my m-file here! I don’t know what the hell is wrong with my code whatever I do it works too good to be correct My neural network, no matter how many neurons I put for its hidden layer it works too good , I know there must be something wrong , if u can figure out where I am wrong , please let me know ,I got so frustrated by this program , what I am doing is a simple classification of the glass data which I got from here: http://archive.ics.uci.edu/ml/machine-learning-databases/glass/ I try to classify this data into 7 classes, no matter how many neurons I have in hidden layer the training and learning errors are about 0. How is it possible? I know I must be wrong somewhere, but I cannot figure it out:/
please help me with this!
if true
%NET STRUCTURE
net=feedforwardnet(1);% i have changed number of neurons here
% but no matter what it is , it works %,i mean the learning error and
%test of error are close to zero:/
net.divideParam.trainRatio=0.9 net.divideParam.valRatio=0.1 net.divideParam.testRatio=0
%LEARNING PHASE
[net,tr]=train(net,OL,traininglabel); net.trainparam.epochs=1000; yt=net(OL); E_oL=mse(yt-traininglabel) learnigErrorofactualdata(ii,1)=E_oL;
%testing PHASE BY USING 20% OF ACTUAL DATA
kv=testdata'; Dv=testlable';
Ytest=net(kv); E_ov=mse(Ytest-Dv);
ValErofACtudata(ii,1)=E_ov end
i attached my m-file , please have a look on it ,thanks in advance , i do need help
8 Comments
Greg Heath
on 4 May 2015
Please explain and post your corrected code.
Did you do anything special to deal with the empty class 4?
Answers (0)
See Also
Categories
Find more on Parallel and Cloud 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!