Professional Documents
Culture Documents
load fisheriris
p=meas'; feedforwardnet
a=zeros(3,50); patternnet
b=zeros(3,50); fitnet
c=zeros(3,50);
a(1,:)=1;
b(2,:)=1; y=sim(net,p(:,150))
c(3,:)=1;
t=[a,b,c]; y=
net=newff(p,t,5);
net=train(net,p,t); -0.0000
y=sim(net,p); 0.0743
0.9258
Regression Problem
1.5
0.5
x = 0:0.1:9 ; -1
plot(x, d)
hold
Add noise and again plot
x = 0:0.1:9 ;
d = 0.02*polyval([1 -13 48],x).*cos(2*x) +0.2*rand(1,size(x));
plot(x, d)
p is the input d is the target. Create the structure, train it, simulate it
Heuristically, we might expect that the noise will 'smear out' each data
point and make it difficult for the network to fit individual data points
precisely, and hence will reduce over-fitting
Early Stopping
Evaluation Methods
• Various networks are trained by
minimization of an appropriate error
function defined with respect to a training
data set. The performance of the networks is
then compared by evaluating the error
function using an independent validation
set, and the network having the smallest
error with respect to the validation set is
selected