I DO NEED HELP, problem with number of neurons in hidden layer of feedforward neural network

6 次查看(过去 30 天)
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 个评论
Fereshteh....
Fereshteh.... 2015-5-4
编辑:Fereshteh.... 2015-5-4
Greg i just fixed my problem i guess, thank you very much , you did help me , your first comment was very helpful ,thanks in count of stars in sky

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by