Equation and neural networks

조회 수: 11 (최근 30일)
azie
azie 2013년 5월 29일
답변: Abdelmalek Bellal 2022년 1월 16일
i am using neural network to predict the output from 2 inputs, can matlab develop an equation based on the calculation for the predicted output?
Let say, here are my input and output
  • input >> output
  • 1 1 >> 2
  • 2 2 >> 4
and next sequence will be predicted by neural network which is
  • 3 3 >> ?
Is there any function that i can use to know the equation used by matlab to calculate next sequence (eg. output= input1 +input2)?

채택된 답변

Greg Heath
Greg Heath 2013년 5월 30일
HiddenVariableMatrix = tanh( InputWeightMatrix*InputVariableMatrix + Biasvector1);
OutputVariableMatrix = Biasvector2 + LayerWeightMatrix*HiddenVariableMatrix;
  댓글 수: 2
azie
azie 2013년 5월 30일
thanks for your response. your answer is actually a coding for ff neural network right? what i want is, the coding/function for developing the specific equation for output. which from your answer is
OutputVariableMatrix = Biasvector2 + LayerWeightMatrix*tanh( InputWeightMatrix*InputVariableMatrix + Biasvector1);
From my understanding, i need to code the above line in my programming. but is there any function that can create specifically an output equation together with assigning weight?
Greg Heath
Greg Heath 2013년 5월 30일
All calculations are obtained via MATLAB functions which perform all of the calculations within.
See the documentation and demos in the Neural Network Toolbox.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

KK
KK 2016년 12월 10일
Hi Greg
I am new to Neural Network and try to learn the theory/formula part such as formulas. Where can I find the equation you pointed out OutputVariableMatrix = Biasvector2 + LayerWeightMatrix*tanh( InputWeightMatrix*InputVariableMatrix + Biasvector1);
under Matlab Neural Netowrk Toolbox?
I try to know other formulas for non-default settings. Could you also recommend some fundamental articles for learning neural network. It is so easy to find the formula about SVM. But I googled a while and could not find a simple clear article about the output equations under neural network. Thanks!
KK
  댓글 수: 1
Greg Heath
Greg Heath 2016년 12월 10일
편집: Greg Heath 2016년 12월 10일
I don't know where MATLAB has explicitly posted that equation. Replace tanh with tansig and try searching in the NEWSGROUP and ANSWERS.
Try
IW LW TANSIG
Hope this helps.
Greg

댓글을 달려면 로그인하십시오.


Abdelmalek Bellal
Abdelmalek Bellal 2022년 1월 16일
Hello Greg,
I used a code for the exraction of wieghts and Baises but the collected vector of predictions by runing the ANN model is diffrent from what I am getting by using the mathematical equation. I believe the extracted weights are not the same weights that are use by the model or the equation is incorrcet? I tried multiple times but I am getting abnormal values that are negative and widely far from what I am getting from collceted vector of prediction with runing the model.
I added exponential to the output y because I am using Log transform.
Below is the obtained predictions from runing the model and the actual outputs: (reasonable)

카테고리

Help CenterFile Exchange에서 Sequence 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