Filter löschen
Filter löschen

Artificial Neural Network - Equations?

26 Ansichten (letzte 30 Tage)
wesleynotwise am 27 Jun. 2017
Kommentiert: Jayferd John am 22 Mai 2024 um 7:18
Let say I want to predict the strength of a composite material using ANN. Is it possible to return a series of equations in the output layer in ANN model? The reason I asked is simply because I want to know how the ANN correlates the independent variables in the input layer and hidden layers, also whether or not that relationship makes any sense in practice.
My gut tells me that it is not possible. Please correct me if I am wrong.

Antworten (4)

Neural networks are very complex models including a lot of parameters, so a neural network that gives an equation as an answer doesn't make much sense, unless you have a few number of them, but the way a neural network works is a black box from wich you can obtain an answer based of an input. If you want to know how strong the relationship between the input and the output is you can use the pearson coefficient if your data is quantitative
  1 Kommentar
wesleynotwise am 28 Jun. 2017
Yes. I think the black box in the neural network is my biggest fear for using it in my case (input and output are quantitative), as the relationship of variable to the output is not clear to the user. For example, if Variable A (one of the input) is directly proportional to the dependent variable (the output), how to know if this relationship still holds in the ANN?

Melden Sie sich an, um zu kommentieren.

Greg Heath
Greg Heath am 28 Jun. 2017
The equation for a single hidden layer is
yn = B1 + LW * tanh( B2 + IW*) *xn
where xn and tn are normalized to [-1,1].
weights IW1 IW2 and biases B1 B2 are
obtained directly fron the trained net.
IW = net.IW , etc.
Hope this helps,
Thank you for formally accepting my answer.
  2 Kommentare
wesleynotwise am 28 Jun. 2017
I think if I need the final equation in the output layer, it is likely to be very long, bulky and chunky, and perhaps not meaningful for the output which is quantitative.
Greg Heath
Greg Heath am 1 Jul. 2017
Bearbeitet: Greg Heath am 2 Jul. 2017
y is obtained from yn by using the inverse part of MAPMINMAX.
y = [(tmax - tmin)/2]*yn + [(tmax + tmin)/2]
Hope this helps.

Melden Sie sich an, um zu kommentieren.

venu T
venu T am 11 Dez. 2018
Bearbeitet: venu T am 11 Dez. 2018
I have run the ANN network and got the answer which is not what is predicted in the ANN I am here with giving all the data please help me
These are the W1 =[-0.098638 -1.478 -0.79801;
1.1991 -0.55255 1.9752;
0.097697 -1.2753 0.79466;
1.8374 0.95918 -0.0096127;
-1.7067 1.3765 1.1093]
W2[-0.43348 0.46505 -0.63726 -0.35395 0.3389]
B2 [-0.63614]
Input X (1)= 200
Answer got for the values is 64.71233 in ANN run by the program
Tansig method
The equation I used from the weight and bais is this
Y=((-0.63614 + (-0.43348*(tansig(-0.098638*x(1)-1.478*x(2)-0.79801*x(3)-3.3287))) +(0.46505*(tansig(1.1991*x(1)-0.55255*x(2)+1.9752*x(3)-1.1953)))+(-0.63726*(tansig(0.097697*x(1)-1.27530*x(2)+0.79466*x(3)-0.17204) ))+(-0.35395* (tansig(1.8374*x(1)+0.95918*x(2)+0.0096127*x(3)+0.92245)))+(0.3389*(tansig(-1.7067*x(1)+1.3765*x(2)-1.1093*x(3)+3.515)))))
Ans is
Y =
which is not correct please hep
  3 Kommentare
Harshvardhan Solanki
Harshvardhan Solanki am 27 Apr. 2024
Hey can you help me with you example you have done...
Jayferd John
Jayferd John am 22 Mai 2024 um 7:18
Hello, how about logsig function?

Melden Sie sich an, um zu kommentieren.

Ali Zakeri
Ali Zakeri am 8 Mai 2021
Bearbeitet: Ali Zakeri am 11 Mai 2021
hi my friends
i have some concetration kinetic data and calculated reaction rate and must curve fitting by neural network.
i trained my network but by ignored of great error , i should fit on a langmuir hinshelwood model and define K parameters. i need this equation for kinetic reaction to use in process software and CFD calculations.
clear all
close all
input=[Bz CHX H2 ];
% Solve an Input-Output Fitting problem with a Neural Network
% Script generated by Neural Fitting app
% Created 24-Apr-2021 19:15:59
% This script assumes these variables are defined:
% input - input data.
% r - target data.
x = input';
t = r';
% Choose a Training Function
% For a list of all training functions type: help nntrain
% 'trainlm' is usually fastest.
% 'trainbr' takes longer but may be better for challenging problems.
% 'trainscg' uses less memory. Suitable in low memory situations.
trainFcn = 'trainbr'; % Bayesian Regularization backpropagation.
% Create a Fitting Network
hiddenLayerSize = 20;
net = fitnet(hiddenLayerSize,trainFcn);
% Setup Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
% Train the Network
[net,tr] = train(net,x,t);
% Test the Network
y = net(x);
e = gsubtract(t,y);
performance = perform(net,t,y)
% View the Network
% Plots
% Uncomment these lines to enable various plots.
%figure, plotperform(tr)
%figure, plottrainstate(tr)
%figure, ploterrhist(e)
%figure, plotregression(t,y)
%figure, plotfit(net,x,t)
%%%%%%%%%%%%%%%%%%%%%%%%%%%% Langmuir model %%%%%%%%%%%%%%%%%%%%%%%
function y=rate2(x)
global Pbz Ph2 Pchx r


Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by