MORE HELPFUL THAN CODE IN HELP/DOC/TYPE NEWFF?
조회 수: 1 (최근 30일)
이전 댓글 표시
% So many users are using NEWFF that I felt the following
% would be useful (especially since it is also relevant
% for FITNET !)
close all, clear all, clc
[x,t ] = simplefit_dataset;
[I N ] = size(x) % [ 1 94]
[O N ] = size(t) % [ 1 94 ]
MSEref = mean(var(t',1)) % 8.3378
% Reference MSE is the result of assuming
% y = mean(t) <==> output = mean(target)
figure(1), plot(x,t)
NLE = 4 % No of local extrema
net = newff(x,t,NLE);
rng(0) % Allows duplication
[ net tr y e ]= train(net,x,t);
% y = net(x); e = t-y;
hold on, plot(x,y,'r--')
NMSE = mse(e)/ MSEref % 0.0058
Rsquare = 1 - NMSE % 0.9942
% Use training record tr to obtain
% the individual performances of the
% training, validation and test subsets
Hope this helps,
Greg
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Modeling and Prediction with NARX and Time-Delay Networks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!