フィルターのクリア

How to get Equation of Function developed by ANN (Curve fitting) after training

4 ビュー (過去 30 日間)
Ajay Goyal
Ajay Goyal 2015 年 3 月 11 日
回答済み: Greg Heath 2015 年 3 月 11 日
Can I get equation of the function in Curve fitting using Artificial Neural Network after training the inputs and outputs

採用された回答

Greg Heath
Greg Heath 2015 年 3 月 11 日
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 件)

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by