How to get Equation of Function developed by ANN (Curve fitting) after training
조회 수: 4 (최근 30일)
이전 댓글 표시
Can I get equation of the function in Curve fitting using Artificial Neural Network after training the inputs and outputs
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!