what is the difference between training and testing in ANN ..?

i have 130 datas of rainfall(input)- runoff (output)...75% are used for training..by using command program in MATLAB,,several trainings are conducted..both rainfall and runoff datas are loaded in prgrm.Atlast training architecture with minimum error of 0.002 ie 2-20-1 architecture was selected for testing.. how to conduct testing..? i am using levemberg backpropagation,..is there any need to load testing output during testing..? can matlab possible to find runoff without loading of targetrunoff(desired runoff) in testing data..?
my programe is given below
%WNM1 forecasting for runoff %wavelets i/p and original time series o/p load rainfall1 load rainfall2 %nip(i,:) represents the ith day daily stage %change
PR1=MINMAX(rainfall1tr); PR2=MINMAX(rainfall2tr); %Network Developing %change net1=newff([PR1;PR2],[8 1],{'tansig' 'purelin'}); net1=init(net1); net1.trainParam.epochs =80000; net1.trainParam.lr=.1; net1.trainParam.mc=.1; net1.trainParam.min_grad=1e-20; net1.trainParam.goal=0; %net1.trainParam.mu_max=1e50; load runoff %change net1 = train(net1,[rainfall1tr;rainfall2tr],runofftr); disp('weights after training of network 1') inputweight1=net1.IW; hiddenweight1=net1.LW; base1=net1.b; O = sim(net1,[rainfall1tr;rainfall2tr]); disp('The output after training is O'); disp(O);
s=0;
load ndis
p=length(runofftr);
for k=1:1:p
t=(ndistr(k)-O(k))^2;
s=s+t;
end
RMSE=sqrt(s/p);
disp('Root mean square error of trained values is')
disp(RMSE)
R=corrcoef(ndistr(k),O(k)); disp('corelation coefficient of trained values is') disp®
here ndis means target output or desired output in testing set..that we have...please reply..how to edit this programe for tesing purpose,,?

Answers (0)

Categories

Find more on Predictive Maintenance Toolbox in Help Center and File Exchange

Asked:

on 4 Apr 2013

Community Treasure Hunt

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

Start Hunting!