Clear Filters
Clear Filters

How to get mse, mae and mape separately for multi layer output?

1 view (last 30 days)
My codes have 2 layer output. But when i run, it only display error values (mse, mae and mape) for single layer output. I don't know whether the error is for first or second layer? Also, i want to get separate error values for each output layer. How do i do that?
Inp=repmat(TInp,1,2);
Out=repmat(TOut,1,2);
[NInp,PS]=mapminmax(Inp)
[NOut,TS]=mapminmax(Out)
[trainInd,valInd,testInd] = divideblock(40,0.5,0.3,0.2);
for i=1:20;
net = feedforwardnet([i,2],'trainlm');
net=train(net,NInp,NOut);
Y=sim(net,NInp);
Targ=mapminmax('reverse',Y,TS);
error=(Out-Targ);
perf=mse(net,Out,Targ);
perf2=mae(error);
perf3=mean(abs(error/Out));
MSE(i,:)=perf;
MAE(i,:)=perf2;
MAPE(i,:)=perf3;
end

Answers (0)

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!