How to get Equation of Function developed by ANN (Curve fitting) after training
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ajay Goyal
am 11 Mär. 2015
Beantwortet: Greg Heath
am 11 Mär. 2015
Can I get equation of the function in Curve fitting using Artificial Neural Network after training the inputs and outputs
0 Kommentare
Akzeptierte Antwort
Greg Heath
am 11 Mär. 2015
clear all, close all, clc
[ x , t ] = simplefit_dataset;
[ I N ] = size( x ) %[ 1 94 ]
[ O N ] = size( t ) %[ 1 94 ]
MSE00 = mean(var(t',1)) % 8.3378
figure(1), hold on
plot( x, t, 'LineWidth', 2 )
net = fitnet;
rng( 'default' )
[ net tr y e ] = train( net, x, t );
% y = net( x ); e = t - y;
plot( x, y, 'r.' )
NMSE = mse(e)/MSE00 %1.7558e-05
Rsquare = 1 - NMSE % 0.99998
xn = mapminmax(x);
[ tn, tsettings ] = mapminmax(t);
b2 = net.b{2} ;
LW = net.LW{ 2, 1 };
B1 = repmat( net.b{1} , I, N ) ;
IW = net.IW{ 1 ,1 };
yn = b2 + LW * tanh( B1 + IW * xn );
y2 = mapminmax.reverse(yn,tsettings);
dy = max(abs(y-y2)) % 3.5527e-15
Hope this helps.
Thank you for formally accepting my answer
Greg
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
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!