Obtaining mathematical equation from neural network toolbox after training

11 ビュー (過去 30 日間)
Julix
Julix 2016 年 7 月 7 日
回答済み: pathakunta 2024 年 1 月 26 日
My ANN is for 3 inputs, N neurons in a single hidden layer and output. Tansig transfer function was used in the hidden layer and purelin in the output layer. Using the weight and bias values, I obtained my model equation
y = LW*(tansig(IW*X + b1 )) + b2
and transformed it into
y = A*((2/(1 + exp(-2*(B*X + b1)))) - 1) + b2
where A = LW values in (1xN) array
B = IW values in (Nx3) array
X = 3 input values in (3x1) array
b1 = layer 1 bias values in (Nx1) array and b2, bias value for layer 2 is a single value (1x1)
My model equation only works in matlab environment because my constants A, B and b1 are in array form.
I need to have A and b1 values as single constant values, and B as a (1x3) array to have B1, B2 and B3 for the 3 inputs. but I don't know how to achieve this..
PLEASE is there anyone that can tell how to make my equation a standalone that works anywhere, like excel & others..??
  3 件のコメント
Julix
Julix 2016 年 7 月 8 日
Thanks. But I did not do that because I don't think the input normalization and output de-normalization has effect on the output values. The extracted equation was used to compute values for y, and in matlab environment, the results were same with the simulated output of the network
Greg Heath
Greg Heath 2016 年 7 月 8 日
I'm not sure that I understand your argument.
If you are saying that the weights do not depend on the type of normalization, you are incorrect.

サインインしてコメントする。

採用された回答

circuit_designer5172
circuit_designer5172 2016 年 7 月 7 日
I believe you are mostly correct in your analysis. To transform out of arrays you can add a summation in front of the equation. Then, in excel each row will represent one input and you will have a column for the contribution to "y" from that input. Then, you just sum them together to get the network output. Hope that is clear!
  1 件のコメント
Julix
Julix 2016 年 7 月 8 日
Thanks.. But I wish there was a more simplified method.

サインインしてコメントする。

その他の回答 (3 件)

Bhupendra Suryawansi
Bhupendra Suryawansi 2017 年 12 月 29 日
My ANN is for 5 inputs and 1 output, N neurons in a single hidden layer and output. Tansig transfer function was used in the hidden layer and purelin in the output layer. i have normalized my input data from 0.1 to 0.9 values using the equation y(norm) = =(0.1+0.8*((Xexp value-Xmin value)/(Xmax value-Xmin value))). Should i change my TANSIG function formula ? and what would be that ? how can i get that which varies the value between 0.1 to 0.9 only.
  1 件のコメント
Greg Heath
Greg Heath 2017 年 12 月 30 日
Why are you bothering to normalize? MATLAB handles normalization automatically.
Just look at the examples used in the help and doc documentation.
Hope this helps.
Greg

サインインしてコメントする。


Bhupendra Suryawansi
Bhupendra Suryawansi 2018 年 1 月 2 日
Can anybody tell me the output equation for Cascade-forward back-propagation network? Means, how to represent the output equation for the Cascade-forward back-propagation neural network? (for five inputs, one output and single hidden layer)

pathakunta
pathakunta 2024 年 1 月 26 日
My ANN is for 5 inputs and 1 output, N neurons in a single hidden layer and output. Tansig transfer function was used in the hidden layer and purelin in the output layer. i have normalized my input data from 0.1 to 0.9 values using the equation y(norm) = =(0.1+0.8*((Xexp value-Xmin value)/(Xmax value-Xmin value))). Should i change my TANSIG function formula ? and what would be that ? how can i get that which varies the value between 0.1 to 0.9 only.

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by