File Exchange

image thumbnail

Mackey Glass Time Series Prediction Using Least Mean Square (LMS)

version 2.0.0.0 (102 KB) by Shujaat Khan
Mackey Glass Time Series Prediction Using Least Mean Square (LMS)

9 Downloads

Updated 15 Jan 2018

View License

In this submission, I demonstrated the problem of time series prediction using least mean square (LMS) algorithm.

Comments and Ratings (9)

tu

Shujaat Khan

Hello Mark,
Now, I uploaded a new code for you. The code is quite similar to this code but it utilize the output generated by the filter itself (you can say a feedback) to predict next outcome. In this way you can generate data for N future values.

https://www.mathworks.com/matlabcentral/fileexchange/61174-extrapolation-of-a-sinusoidal-signal-using-least-mean-square--lms-

Mark

Ah! Now I understand. Brilliant work.

If I can give a suggestion for the next update, incorporating the "few modifications" so the code can extrapolation beyond the end of data (i.e. past 3000) would be helpful.

Thanks again

Shujaat Khan

There was some mistakes in previous version. In this update I made following changes.

- correction of weight update rule.
- correction of error calculation

Shujaat Khan

In time series prediction we feed some initial values or past data to predict the future outcome. This is closely related to extrapolation. In this implementation you can only predict the first next outcome, that is to say, if you provide values for t={-M,-M+1,-M+2, ... , 0}, then you can predict the value at time t=1.

With few modifications you can change this code to predict other future values as well.

Mark

To be clear, can I modify the code to extrapolate the data to an x-value of say 3300?

Mark

I'm not sure if I understand the purpose of this algorithm

Does this algorithm extrapolate over the range of Ts (the testing data)?

If yes, why are Xs fed into the "prediction of the next outcome of the series using previous samples?

If not, what is the testing data in the context of this algorithm

Sorry, I'm new to LMS.

Thank you very much

Shujaat Khan

Thank you Mark for your positive comments.

Selection of etaf, and f is not in the part of this submission. I will try to put the explanation in the relevant submission.

Mark

A procedure for picking eta, etaf, f and M would be helpful.

Excellent work though

Updates

2.0.0.0

- Random initialization of weights
- Teacher forcing method and ARMA modelling support
- Prediction of sequence output of forward #time_steps

1.0.0.0

- Example

1.0.0.0

- correction of weight update rule.
- correction of error calculation

1.0.0.0

display picture change

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Time_Series_LMS/html/