HELP :( high learning error or low performance in neural network classifying ?
6 次查看(过去 30 天)
显示 更早的评论
i did write this code, it is a simple code to classify 685, twelve dimensional data in to 3 classes, class 1 and 2 and 3 , my classifier is a neural network , i have no idea what wrong is with my code that my learning error (pf)is so high and it is around 0.4 - 0.6. no matter what i do it doesn't get any lower, i need it to be very lower for example 0.02 or 0.04 , i couldn't load my input matrix here due to it is so big , is there anyone to help me please ??? i change the number of my hidden nodes from 6 up to 400 but no improvement achieved , i also changed the number of epochs but again nothing :((((
if true
clc;
close all;
clear all;
load('E:\all uni stuff\thesis\data feature\CRQA_sort_ICA.mat') xs=CRQA_gham_sort; xn=CRQA_khonsa_sort; xh=CRQA_shad_sort; xs(:,:,12)=[]; xs(:,:,7)=[]; xn(:,:,12)=[]; xn(:,:,7)=[]; xh(:,:,12)=[]; xh(:,:,7)=[];
st.f1=reshape(xh(:,5,:),207,11); st.f2=reshape(xs(:,5,:),237,11); st.f3=reshape(xn(:,5,:),241,11); k1=[st.f1;st.f2;st.f3];
D1=ones(1,207); D2=2*ones(1,237); D3=3*ones(1,241); DD=[D1 D2 D3]'; m=[DD,k1]; n=size(m,1); p=randperm(n); m=m(p,:); D=m(:,1); k=m(:,2:12); %--------------------------original------------
%%%D=D'; OL=[k(1:157,:);k(208:394,:);k(445:635,:)]'; DL=[D(1:157,:);D(208:394,:);D(445:635,:)]'; %D1=zeros(1,157); %D2=ones(1,187); %D3=2*ones(1,191); %DL=[D1 D2 D3]; %--------------------------learning phase----------------------------
%size(OL); %size(DL);
%%k=k'; % net = newff(OL,DL,20); % net = train(net,OL,DL); % outputs = net(OL); % errors = outputs -DL ; % perf = perform(net,outputs,DL) % net=newff(OL,DL,[9,3]); % net=newff(OL,DL,5); %net=newff(OL,[6,4,1],{'tansig' 'tansig' 'purelin'},'traincgf'); net=newff(minmax(OL),[10,1],{'tansig' 'purelin'},'trainlm'); %net=newff(minmax(k),[8,1],{'tansig' 'purelin'},'trainlm'); net.trainParam.epochs=500; %net.trainparam.lr=0.002; net=train(net,OL,DL); YL=sim(net,OL); E_oL=mse(YL-DL) % my learning error %net=train(net,k,D); %YL=sim(net,k); %E_oL=mse(YL-D)
end
1 个评论
Greg Heath
2014-11-23
编辑:Greg Heath
2014-11-23
No one will respond until you format the code.
An unscaled value of MSE means ABSOLUTELY NOTHING ... unless, for example, it is normalized by the average target variance!
NMSE = mse(t-y)/mean(var(t',1)) % Should be in [ 0,1 ];
My goal is NMSE < 0.01 so that the net models more than 99% of the target variance
I also recommend that you try the code on a MATLAB classifier dataset For example
[ x, t] = iris_dataset;
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!