Artificial Neural Network - Equations?
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
0 commentaires
Réponses (4)
JESUS DAVID ARIZA ROYETH
le 27 Juin 2017
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
Greg Heath
le 28 Juin 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.
Greg
2 commentaires
Greg Heath
le 1 Juil 2017
Modifié(e) : Greg Heath
le 2 Juil 2017
y is obtained from yn by using the inverse part of MAPMINMAX.
y = [(tmax - tmin)/2]*yn + [(tmax + tmin)/2]
Hope this helps.
Greg
venu T
le 11 Déc 2018
Modifié(e) : venu T
le 11 Déc 2018
Hi
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]
B1[-3.3287;
-1.1953;
-0.17204;
0.92245;
3.515]
B2 [-0.63614]
Input X (1)= 200
X(2)=1.5
X(3)=5
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 =
-1.0677
which is not correct please hep
3 commentaires
Ali Zakeri
le 8 Mai 2021
Modifié(e) : Ali Zakeri
le 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.
thanks
clc
clear all
close all
Bz=xlsread('exdata.xlsx','O3:O62');
CHX=xlsread('exdata.xlsx','P3:P62');
H2=xlsread('exdata.xlsx','Q3:Q62');
r=xlsread('exdata.xlsx','R3:R62');
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
view(net)
% 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
k1=x(1);
k2=x(2);
Kbz=x(3);
Kh2=x(4);
y=((k1.*Pbz.*Ph2-k2.*Pchx)./(1+Kbz.*Pbz+Kh2.*Ph2))+r;
0 commentaires
Voir également
Catégories
En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!