testing a neural network program
2 views (last 30 days)
Show older comments
I have done a neural network program with matlab. I have trained the program with batch training mode. Now I want to test if the program work well. I know I can not change the weights in testing mode ie. the old weights under training mode in the network must be unchanged. I have trained the network with 26 different patterns simultaneously at every epoch and total 1014 patterns. Therefore, the weights in the network is initiated for 26 patterns. Now I want to test the network with just one patterns. How can I do this without changing the network weights.
Thanks in advance
0 Comments
Accepted Answer
Greg Heath
on 4 Jan 2012
[I Ntst] = size(ptst) % Test Input
[O Ntst] = size(ttst) % Target
% Naive constant model
y00tst = repmat(mean(tst,2),1,Ntst);
MSE00tst = mse(ttst-y00tst)
% Neural Net model
ytst = sim(net,ptst);
MSEtst = mse(ttst-ytst)
R2tst = 1- MSEtst/MSE00tst
Hope this helps.
Greg
0 Comments
More Answers (0)
See Also
Categories
Find more on Deep 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!