Calculate MSE for testing data

6 Ansichten (letzte 30 Tage)
B Farah
B Farah am 16 Mär. 2019
Bearbeitet: B Farah am 16 Mär. 2019
I have the folloing newrb code
if any one can help me, I need to add code to calculate the value of MSE for testing part for each neuron
Thank you
Xt= [0,0.0213000000000000,0.0426000000000000,0.0638000000000000,0.0851000000000000,0.106400000000000,0.127700000000000,0.148900000000000,0.170200000000000,0.191500000000000,0.212800000000000,0.234000000000000,0.255300000000000,0.276600000000000,0.297900000000000,0.319100000000000,0.340400000000000,0.361700000000000,0.383000000000000,0.404300000000000,0.425500000000000,0.446800000000000,0.468100000000000,0.489400000000000,0.510600000000000,0.531900000000000,0.553200000000000,0.574500000000000,0.595700000000000,0.617000000000000,0.638300000000000,0.659600000000000,0.680900000000000,0.702100000000000,0.723400000000000,0.744700000000000,0.766000000000000,0.787200000000000,0.808500000000000,0.829800000000000,0.851100000000000,0.872300000000000,0.893600000000000,0.914900000000000,0.936200000000000,0.957400000000000,0.978700000000000,1]
Tt=[0.219300000000000,0.195000000000000,0.0972000000000000,0.0796000000000000,0.0668000000000000,0.144800000000000,0.0715000000000000,0.0740000000000000,0.0898000000000000,0.130600000000000,0.0584000000000000,0.0945000000000000,0.119600000000000,0.144000000000000,0.224700000000000,0.168000000000000,0.260200000000000,0.103600000000000,0.0703000000000000,0.0954000000000000,0.216600000000000,0.301700000000000,0.271400000000000,0.0717000000000000,0.145000000000000,0.0979000000000000,0.466400000000000,0.249700000000000,0,0.0391000000000000,0.132800000000000,0.106900000000000,0.125700000000000,0.350900000000000,0.140300000000000,0.155600000000000,0.0541000000000000,0.213800000000000,0.614000000000000,0.819200000000000,0.702300000000000,0.784200000000000,0.871800000000000,0.708300000000000,1,0.828500000000000,0.853200000000000,0.314100000000000]
net=newrb(Xt,Tt,0.001,.1,5,5);
y=sim(net,Xt);
plot(y,'b-+','LineWidth',2)
hold on;
plottools('on')
plotbrowser('on')
set(gcf,'toolbar','figure')
set(gcf,'menubar','figure')
plot(Tt,'color','r','LineWidth',2);
xlabel('Period')
ylabel('MSE')
legend({'Output','Target'})
Er=y-Tt;
Se=Er.^2;
MSE1=mean(Se)

Antworten (0)

Kategorien

Mehr zu Chemistry finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by