different ANN predictions from manually ones
古いコメントを表示
I have used artificial neural network to model some individual tree attributes. In my ANN procedure, I used the feed forward backprop training procedure, including training procedure is TRAINLM, number of layers are 2, number of neurons are 10, transfer function is LOGSIG. I used ANN Matlab code;
net=newff([0 1],[10, 1],{'logsig','logsig'},'trainlm');
net.trainParam.epochs=3000;
net.trainParam.show=1000;
net.trainParam.goal=1e-10;
net.trainParam.min_grad=1e-10;
[net, tr]=train(net, input, target);
aaa=sim(net,input); w1 = net.IW{1} w2 = net.LW{2} b1 = net.b{1} b2 = net.b{2}
I want manually to calculate these simulation values, also called networkoutput in Matlab, by using weight values and biases obtained from Matlab, because these manual predictions and formulae are very important to present for reader for my article and projects,
Then I used the these formula: 1. Step: Nöron 1 = IW(1:1)*Inputnorm+b(1:1) Nöron 2 = IW(1:1)*Inputnorm+b(1:2) Nöron 3 = IW(1:1)*Inputnorm+b(1:3) Nöron 4 = IW(1:1)*Inputnorm+b(1:4) Nöron 5 = IW(1:1)*Inputnorm+b(1:5) Nöron 6 = IW(1:1)*Inputnorm+b(1:6) Nöron 7 = IW(1:1)*Inputnorm+b(1:7) Nöron 8 = IW(1:1)*Inputnorm+b(1:8) Nöron 9 = IW(1:1)*Inputnorm+b(1:9) Nöron 10= IW(1:1)*Inputnorm+b(1:10) 2. Step: Transfer functions:
E1=1/(1+EXP(-N1)) E2=1/(1+EXP(-N2)) E3=1/(1+EXP(-N3)) E4=1/(1+EXP(-N4)) E5=1/(1+EXP(-N5)) E6=1/(1+EXP(-N6)) E7=1/(1+EXP(-N7)) E8=1/(1+EXP(-N8)) E9=1/(1+EXP(-N9)) E10=1/(1+EXP(-N10))
3. Step:
Sum=LW(1:1)*E1+ LW(1:2)*E2+ LW(1:3)*E3+ LW(1:4)*E4+ LW(1:5)*E5+ LW(1:6)*E6+ LW(1:7)*E7+ LW(1:8)*E8+ LW(1:9)*E9+ LW(1:10)*E10+b((2:1)
4. Step:
output=1/(1+EXP(-Sum))
IW(1:1)=Weight value in first layer, LW(1:2)=Weight value in second layer, b(1:1)=bias values in first layer, b(2:1)= bias value in second layer.
But, I can not obtain the output values from Matlab by using these formulas, What is wrong is in these formulas. I want to point out these two prediction procedure use the same input values, It is important to determine formulas in ANN prediction. I would be glad if you help me about these subject.
Best regards.
Dr. İlker ERCANLI
1 件のコメント
Greg Heath
2016 年 6 月 15 日
There was a duplicate of this question in the Answer box.
It was deleted.
Greg
採用された回答
その他の回答 (2 件)
ilker ERCANLI
2016 年 6 月 15 日
0 投票
1 件のコメント
Tien Tran
2016 年 6 月 20 日
Hi Dr. Ilker I understand your problem. I will discuss with you soon
Greg Heath
2016 年 6 月 20 日
You are using the colon (:) instead of the comma (,) in your matrix notation.
The jth component in the ith row of A is
A(i,j) NOT A(i:j)
Hope this helps.
Thank you for formally accepting my answer
Greg
カテゴリ
ヘルプ センター および File Exchange で Deep Learning Toolbox についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!