I want to decompose many monthly time series data into seasonal factor. After first trying the code below for 1 time series (that is bmix_e) the code is work.
decomposed = sm.tsa.seasonal_decompose(df.bmix_e.values, model='multiplicative', freq=12)
However after I added the second time series that is bmix_s the code did't work event I use the same code as above.
So,I would like to know
How to code for seasonal decomposing for more than 2 time series?
After decomposing the series how I can get the average of monthly seasonal factor of each time series in data frame form (because I get the result in array form according to the code as decomposed.seasonal).
When forecasting periodic data, it is useful to normalize the seasonality out of a dataset. It has become easier to do this with the development of
Seasonal Autoregressive Integrated Moving Average
, orSARIMA
. With the adjustment of hyperparameters, an accurate model can be created.Code pasted below (source)