Escolar Documentos
Profissional Documentos
Cultura Documentos
>> p=[0.1614 0.1394 0.1171 0.1070 0.1342 0.1738 0.4204;0.1394 0.1171 0.1070 0.1342 0.1738
0.4204 0.6863;0.1171 0.1070 0.1342 0.1738 0.4204 0.6896 0.6363]
p=
t=
>> net=newff(minmax(p),[3,1],{'tansig','purelin'},'traingd')
net =
architecture:
numInputs: 1
numLayers: 2
biasConnect: [1; 1]
inputConnect: [1; 0]
layerConnect: [0 0; 1 0]
outputConnect: [0 1]
targetConnect: [0 1]
numOutputs: 1 (read-only)
numTargets: 1 (read-only)
numInputDelays: 0 (read-only)
numLayerDelays: 0 (read-only)
subobject structures:
adaptFcn: 'trains'
initFcn: 'initlay'
performFcn: 'mse'
trainFcn: 'traingd'
parameters:
adaptParam: .passes
initParam: (none)
performParam: (none)
trainParam: .epochs, .goal, .lr, .max_fail,
.min_grad, .show, .time
other:
>> net.IW{1,1}
ans =
>> net.b{1}
ans =
-5.0483
1.7169
-2.5927
>> net.LW{2,1}
ans =
>> net.b{2}
ans =
0.8436
>> [a,Pf,Af,e,Perf]=sim(net,p,[],[],t)
a=
Pf =
[]
Af =
[]
e=
Perf =
0.3859
>> net=train(net,p,t)
TRAINGD, Epoch 0/100, MSE 0.385892/0, Gradient 1.57445/1e-010
TRAINGD, Epoch 25/100, MSE 0.096807/0, Gradient 0.644469/1e-010
TRAINGD, Epoch 50/100, MSE 0.0441482/0, Gradient 0.298421/1e-010
TRAINGD, Epoch 75/100, MSE 0.0316245/0, Gradient 0.158707/1e-010
TRAINGD, Epoch 100/100, MSE 0.0276762/0, Gradient 0.0967356/1e-010
TRAINGD, Maximum epoch reached, performance goal was not met.
net =
architecture:
numInputs: 1
numLayers: 2
biasConnect: [1; 1]
inputConnect: [1; 0]
layerConnect: [0 0; 1 0]
outputConnect: [0 1]
targetConnect: [0 1]
numOutputs: 1 (read-only)
numTargets: 1 (read-only)
numInputDelays: 0 (read-only)
numLayerDelays: 0 (read-only)
subobject structures:
functions:
adaptFcn: 'trains'
initFcn: 'initlay'
performFcn: 'mse'
trainFcn: 'traingd'
parameters:
adaptParam: .passes
initParam: (none)
performParam: (none)
trainParam: .epochs, .goal, .lr, .max_fail,
.min_grad, .show, .time
other:
a=
Pf =
[]
Af =
[]
e=
Perf =
0.0277
>> net.trainParam.epochs=10000;
>> net.trainParam.show=1000;
>> net.trainParam.goal=0.01;
>> net=train(net,p,t)
TRAINGD, Epoch 0/10000, MSE 0.0130678/0.01, Gradient 0.0279379/1e-010
TRAINGD, Epoch 1467/10000, MSE 0.00999798/0.01, Gradient 0.0232265/1e-010
TRAINGD, Performance goal met.
net =
architecture:
numInputs: 1
numLayers: 2
biasConnect: [1; 1]
inputConnect: [1; 0]
layerConnect: [0 0; 1 0]
outputConnect: [0 1]
targetConnect: [0 1]
numOutputs: 1 (read-only)
numTargets: 1 (read-only)
numInputDelays: 0 (read-only)
numLayerDelays: 0 (read-only)
subobject structures:
functions:
adaptFcn: 'trains'
initFcn: 'initlay'
performFcn: 'mse'
trainFcn: 'traingd'
parameters:
adaptParam: .passes
initParam: (none)
performParam: (none)
trainParam: .epochs, .goal, .lr, .max_fail,
.min_grad, .show, .time
other:
>> [a,Pf,Af,e,Perf]=sim(net,p,[],[],t)
Untuk tabel 1 dengan goal tercapai
a=
Pf =
[]
Af =
[]
e=
Perf =
0.0100
>> p1=[0.1070 0.1342 0.1738 0.4204 0.1614 0.1394 0.1171;0.1342 0.1738 0.4204 0.6896
0.1394 0.1171 0.1070;0.1738 0.4204 0.6896 0.6363 0.1171 0.1070 0.1342]
p1 =
t1 =
a=
Pf =
[]
Af =
[]
e=
Perf =
0.0100
>>