带统计模型的ARMA样本外预测

带统计模型的ARMA样本外预测,第1张

带统计模型的ARMA样本外预测

我认为这是一个问题。如果您在github上提交一个文件,我将更可能记得添加类似的内容。预测机制(尚未)可用作面向用户的功能,因此您必须执行类似的 *** 作。

如果您已经适合模型,则可以执行此 *** 作。

# this is the nsteps ahead predictor functionfrom statsmodels.tsa.arima_model import _arma_predict_out_of_sampleres = sm.tsa.ARMA(y, (3, 2)).fit(trend="nc")# get what you need for predicting one-step aheadparams = res.paramsresiduals = res.residp = res.k_arq = res.k_mak_exog = res.k_exogk_trend = res.k_trendsteps = 1_arma_predict_out_of_sample(params, steps, residuals, p, q, k_trend, k_exog, endog=y, exog=None, start=len(y))

这是向前迈出的新的预测步骤。您可以将其附加到y,并且需要更新残差。



欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5630651.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存