MATLAB: Different ANN predictions from manually ones

MATLABmatlab prediction

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

Best Answer

I did not go through your text in detail.
However, it seems that you have not normalized input and target and unnormalized the output.
Hope this help.
Thank you for formally accepting my answer
Greg