This time, I would like to doing a simulation of time series decomposition. We will break down into 2 kind of decomposition which are multiplicative and additive. Using a dummy dataset us-airlines-monthly-aircraft-miles-flown.csv, we capture the decomposition in both ways.
- import related libraries
- load the dataset, and indexing the date
- running the seasonal decomposition for additive model
result = seasonal_decompose(decomp_df['MilesMM'], model='additive')
- running the seasonal decomposition for multiplicative model
result2 = seasonal_decompose(decomp_df['MilesMM'], model='multiplicative')