简体   繁体   English

Python中的多季节性时间序列分析

[英]multiple seasonality Time series analysis in Python

I have a daily time series dataset that I am using Python SARIMAX method to predict for future.我有一个每日时间序列数据集,我使用 Python SARIMAX 方法来预测未来。 But I do not know how to write codes in python that accounts for multiple seasonalities.但我不知道如何在 python 中编写考虑多个季节性的代码。 As far as I know, SARIMAX takes care of only one seasonality but I want to check for weekly, monthly, and quarterly seasonalities.据我所知,SARIMAX 只处理一个季节性,但我想检查每周、每月和每季度的季节性。 I know to capture day of the week seasonality, I should create 6 dummy variables, To capture day of the month seasonality, create 30 dummy variables, and To capture month of the year, create 11 dummy variables.我知道要捕捉星期几的季节性,我应该创建 6 个虚拟变量,要捕捉月份的季节性,创建 30 个虚拟变量,并且要捕捉一年中的月份,创建 11 个虚拟变量。 But I don't know how to incorporate it with the main SARIMAX function in Python?但我不知道如何将它与 Python 中的主要 SARIMAX 函数合并? I mean SARIMAX is just a function that does the autoregressive, moving average and the differencing parts but how should I include multiple seasonality codes in my time series analysis with SARIMAX?我的意思是 SARIMAX 只是一个执行自回归、移动平均和差分部分的函数,但是我应该如何在使用 SARIMAX 的时间序列分析中包含多个季节性代码? So far, I know how to create dummy variables for each category but don't know how to replicate it to the entire dataset?到目前为止,我知道如何为每个类别创建虚拟变量,但不知道如何将其复制到整个数据集? After that I don't know how to write Python codes that do SARIMAX and captures multiple seasonalities at the same time.之后我不知道如何编写 Python 代码来执行 SARIMAX 并同时捕获多个季节性。

I am in need of help for Python code that can do it.我需要可以执行此操作的 Python 代码的帮助。

Please advise accordingly请相应地建议

Regards问候

Yes, SARIMA model is designed for dealing with a single seasonality.是的,SARIMA 模型是为处理单一季节性而设计的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM