Machine Learning is Fun – Part 11 – Time Series

Viewer Rating

Dear Friends,

Hope you are all well. Today I want to discuss an interesting topic and that is time series analysis.

Yes, we are trying to predict the amount of data that is captured in some interval of time.

Now you can ask – if we already have linear regression, then why do we need another prediction model?

Suppose you are trying to predict some sales of some products. But you do not know what the parameters you need to consider or what the features are that you need to capture. The only parameter you have is time itself.

Now you have to think about time series analysis.

Today I shall discuss the key components of time series analysis: seasonality, trend, irregularly.

If you find some profit kind of thing or loss in data then you will see some kind of uptrend or down trend. If you see some seasonal fluctuations on sales for some festival that is called seasonality.

If you find some kind of sudden fluctuation due to some unwanted issues like natural disasters like flood, earthquake or some kind of political issues, that is called irregularity.

First of all, you need to identify the above mentioned things in your data. If you identify them by line graph, then you need to remove them from the data by transformation.

This is called making non-stationary data into stationary data by removing white noises.

The variance should be same on each interval of time and mean should be parallel with X axis means same for each interval of time.

Non-stationary data looks like below:

After converting data into stationary:

Can you see the difference?

The mean, variance and covariance are constant with respect to time. You can apply log function or differentiation function to achieve the same.

Now your data is ready to apply time series algorithm. The best algorithm is ARIMA model.

That’s all for today.

I shall discuss ARIMA model in my next post.

Stay tuned.

3 thoughts on “Machine Learning is Fun – Part 11 – Time Series”

Leave a Comment

%d bloggers like this: