Solution to the Exercise 2: Inspecting and Removing Seasonality

This workflow shows the seasonality of time series (energy consumption) in an autocorrelation plot. The seasonality is removed by differencing the time series at the lag where the maximum peak is detected in the autocorrelation plot. As an alternative approach, the time series is decomposed into its trend, first and second seasonalities, and irregular component. The distribution of energy consumption for each hour is shown for both the original and differenced time series.


This is a companion discussion topic for the original entry at https://kni.me/w/bNFKN9KmjBl3RxVt

Hi! How i know, that i have to put max lag 180? Thank you!

Hi @Loknica07 -

It’s somewhat arbitrary, but I believe the idea here is that you want to set a max lag that would cover a “reasonable” amount of seasonality that you might expect to see. Since this is hourly data, a lag of 180 goes back approximately 1 week.