Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
Shay Ang
Shay Ang am 15 Mär. 2019
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

Antworten (0)

Kategorien

Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by