How to get Equation of Function developed by ANN (Curve fitting) after training
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ajay Goyal
le 11 Mar 2015
Réponse apportée : Greg Heath
le 11 Mar 2015
Can I get equation of the function in Curve fitting using Artificial Neural Network after training the inputs and outputs
0 commentaires
Réponse acceptée
Greg Heath
le 11 Mar 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Deep Learning Toolbox 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!