Professional Documents
Culture Documents
html
Contents
Time Series Data
Preprocessing the Data
Building the ANFIS Model
Error Curves
Comparisons
Prediction Errors of ANFIS
When x(0) = 1.2 and tau = 17, we have a non-periodic and non-convergent time series that is very sensitive to initial conditions. (We assume x(t)
= 0 when t < 0.)
load mgdata.dat
a = mgdata;
time = a(:, 1);
x_t = a(:, 2);
plot(time, x_t);
xlabel('Time (sec)'); ylabel('x(t)');
title('Mackey-Glass Chaotic Time Series');
From t = 118 to 1117, we collect 1000 data pairs of the above format. The first 500 are used for training while the others are used for checking.
The plot shows the segment of the time series where data pairs were extracted from. The first 100 data points are ignored to avoid the transient
portion of the data.
1 of 4 05/02/2011 19:36
Fuzzy Logic Toolbox - Chaotic Time-Series Prediction Demo file:///D:/TA luca/referensi/demos.html
chk_data(:, 3) = x_t(613:1112);
chk_data(:, 4) = x_t(619:1118);
chk_data(:, 5) = x_t(625:1124);
fismat = genfis1(trn_data);
There are 2^4 = 16 rules in the generated FIS matrix and the number of fitting parameters is 108, including 24 nonlinear parameters and 80 linear
parameters. This is a proper balance between number of fitting parameters and number of training data (500). The ANFIS command looks like
this:
After ten epochs of training, the final MFs are shown in the plots. Note that these MFs after training do not change drastically. Obviously most of
the fitting is done by the linear parameters while the nonlinear parameters are mostly for fine- tuning for further improvement.
2 of 4 05/02/2011 19:36
Fuzzy Logic Toolbox - Chaotic Time-Series Prediction Demo file:///D:/TA luca/referensi/demos.html
Error Curves
This plot displays error curves for both training and checking data. Note that the training error is higher than the checking error. This phenomenon
is not uncommon in ANFIS learning or nonlinear regression in general; it could indicate that the training process is not close to finished yet.
Comparisons
This plot shows the original time series and the one predicted by ANFIS. The difference is so tiny that it is impossible to tell one from another by
eye inspection. That is why you probably see only the ANFIS prediction curve. The prediction errors must be viewed on another scale.
diff = x_t(index)-anfis_output;
plot(time(index), diff);
xlabel('Time (sec)');
3 of 4 05/02/2011 19:36
Fuzzy Logic Toolbox - Chaotic Time-Series Prediction Demo file:///D:/TA luca/referensi/demos.html
© 1994-2011 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS
4 of 4 05/02/2011 19:36