Hi All,
I am using Matlab to
construct a Neural Network. But I am getting some problem on the time
of TRAINING & SIMULATION.
Problem is like following:-
I hve two inputs x,y. Both are random.
for i=1:25
x=1+rand(1,i)*9;
y+rand(1,i)*9;
end
I have one target say 'z'. 80% of total data I will train the network
& 20% data for testing.
What will be the correct nnnetwork, Training & simulation
functions? I have written a program for this problem, it is as follow:-
clear all;
clc;
for i=1:25
r=1+rand(1,i)*9;
s+rand(1,i)*9;
end
a=1;
b=2;
c=3;
[x,o]=shuffle(r);
y=orderby(s,o);
for j=1:20
ip1(j)=x(j);
ip2(j)=y(j);
num(j)=o(j);
end
mn=min(x);
mx=max(y);
i=1:25;
n= setdiff(i,num);
tsr=x(1,n);
tss=y(1,n);
trd=[ip1 ip2];
tsd=[tsr tss];
t1=a.*(x).^2+b.*(x).*(y)+c.*(y).^2;
t2=a.*(ip1).^2+b.*(ip1).*(ip2)+c.*(ip2).^2;
net = network(2,2,[1 ; 1],[1 1;1 1],[1 1;1 1],[1 1],[1 1]);
net.adaptFcn = 'adaptwb';
net.initFcn = 'initlay';
net.performFcn = 'mse';
net.trainFcn = 'traingdm';
net.trainParam.epochs = 500;
net.trainParam.goal = 0.00001;
net.trainParam.max_fail = 5;
net.trainParam.mem_reduc = 1;
net.trainParam.min_grad = 1e-10;
net.trainParam.mu = 0.001;
net.trainParam.mu_dec = 0.1;
net.trainParam.mu_inc = 10;
net.trainParam.mu_max = 1e10;
net.trainParam.show = 25;
net.trainParam.time = inf;
net = train(net,[ip1 ip1],[t2 t2]);
Plz help me abt the training, nnnetwork,simulation functions.
Thanking You.