No BSD License  

Highlights from
Mackey-Glass Time Series Forecasting using Method 1 Single Stage Fuzzy Forecaster

image thumbnail

Mackey-Glass Time Series Forecasting using Method 1 Single Stage Fuzzy Forecaster

by

 

11 Oct 2007 (Updated )

For Mackey-Glass Time Series Forecasting : Method 1 Fuzzy Forecaster

ttsf(mydata)
% Testing Data points L = 495

% TO RUN
% ---------
% mydata = mgts(3000);
% n = 0;
% RMSE = ttsf(mydata)


function RMSE = ttsf(mydata)               % Test Time Series Forecasting
L=400;                                                           % No. of Test Points
for n = 0:L
    fcs(n+505) = st1(mydata, n);
end

% Plot My Data
t=1001:2000;
subplot(2, 1, 1);
plot(t, mydata)
h = legend('My Data', 1);

% Plot Forecasted & Test Data Simultaneously
t = 505:505+L;
tsd = mydata(505:505+L);
fcd = fcs(505:505+L);
subplot(2, 1, 2);
plot(t, fcd, '-k', t, tsd, ':b')
h = legend('Forecast','Test Data',2);


ErrS = 0;
for t=1:L
    ErrS = ErrS + (tsd(t) - fcd(t))^2;
end

RMSE = sqrt(ErrS/L);

Contact us