Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/352.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python StatsModels-指数平滑需要无限时间来拟合_Python_Jupyter_Statsmodels_Predict_Holtwinters - Fatal编程技术网

Python StatsModels-指数平滑需要无限时间来拟合

Python StatsModels-指数平滑需要无限时间来拟合,python,jupyter,statsmodels,predict,holtwinters,Python,Jupyter,Statsmodels,Predict,Holtwinters,我试图复制这个可执行文件(),但在它开始的部分,霍尔特模型的拟合,jupyter笔记本挂在。。我已经等了30多分钟了,什么都没有 需要花费大量时间的单元格(Kaggle示例中的数字18) import statsmodels.api as sm # exponential smoothing only takes into consideration patterns in the target variable # so we discard the other features exp_

我试图复制这个可执行文件(),但在它开始的部分,霍尔特模型的拟合,jupyter笔记本挂在。。我已经等了30多分钟了,什么都没有

需要花费大量时间的单元格(Kaggle示例中的数字18)

import statsmodels.api as sm

# exponential smoothing only takes into consideration patterns in the target variable
# so we discard the other features
exp_smooth_train, exp_smooth_test = train['demand_in_MW'], test['demand_in_MW']

# fit & predict
holt_winter = sm.tsa.ExponentialSmoothing(exp_smooth_train,
                                          seasonal_periods=24*365,
                                          seasonal='add').fit()
y_hat_holt_winter = holt_winter.forecast(len(exp_smooth_test))


可能是因为它试图估算与季节性零件相关的参数。你也有很多样品;将这些数据结合起来,预计需要很长时间……在的第3段中,它说“ETS()模型将季节性限制为最多24个周期,以允许每小时数据,但不允许季节性周期较大的数据−1初始季节状态的待估计参数,其中m是季节周期。因此,对于大m,估计几乎不可能。“这对于R来说是一样的,但对于任何语言,想法都是一样的。我不知道你链接的Kaggler等待了多少时间,或者他们有多少超级计算机,但出于实用性,我得说ETS不是这么长时间的季节性。好的,谢谢。这很有道理。。。您建议使用哪一个季节@mustafa aydınI不是专家,但从笔记本的视觉效果来看,每天的季节性很明显。所以,如果你必须使用ETS,也许你可以试试24。对于这类复杂的季节性数据,您可能希望查看同样具有Python的模型。这也很慢,但在这种情况下可能比ETS快。