python模型预测_使用python构建ARIMA模型进行预测分析的小说明:forecast函数

更新时间:2023-06-14 09:57:06 阅读: 评论:0

海文考研怎么样
python模型预测_使⽤python构建ARIMA模型进⾏预测分析的
日常生活英语单词⼩说明:forecast函数
Autoregressive Integrated Moving Average model(ARIMA),即差分整合移动平均⾃回归模型,或称为整合移动平均⾃回归模型,是⼀种时间序列预测分析⽅法。今天我在实践过程中遇到⼀个⼩问题,后来看了官⽅⽂档才弄清楚,这⾥和⼤家分享⼀下。o ring
⾸先分享三篇我觉得⽐较好并且容易上⼿的教程,其中包含源代码可以直接使⽤。第⼀篇是⼀个最简单的⼊门,是单步预测;第⼆篇可以进⾏多步预测;第三篇对于算法使⽤前的数据处理和分析进⾏了详细的介绍;第四篇也有相详尽的步骤和代码,并对数据进⾏了详细的分析,第五篇详细的介绍了从线性回归到AR、ARMA、ARIMA及GARCH等⽅法。
以第⼆个链接中的代码为例。这个链接中的《5. Multi-Step Out-of-Sample Forecast》将的是对样本量之外的多步预测,使⽤的Forecast function。具体的说,⽬前的数据为截⽌到12⽉24⽇的历年最低⽓温,现在要预测从12⽉25⽇到12⽉31⽇的最低⽓温。这⾥使⽤的代码为:出国前英语培训
forecast = model_fit.forecast(steps=7)[0]
其中steps=7很好理解,就是预测未来七天的意思。可是后边⽅括号⾥的0让我很费解,⽽且把forecast
的数据打印出来也很奇怪,是两⾏7个元素的数组,加⼀个⼆维的矩阵。后来看了官⽅⽂档之后,发现取0⾏是因为只有这⼀⾏才是预测的结果,第⼆⾏是预测的标准差(standard error),后边的⼆维矩阵是预测的置信区间。具体的官⽅解释如下:
ARIMAResults.forecast(steps=1, exog=None, alpha=0.05)
Out-of-sample forecasts
Parameters:
美少女的谎言第3季steps : int
The number of out of sample forecasts from the end of the sample.
exog : array
If the model is an ARIMAX, you must provide out of sample values for the exogenous variables. This should not include the constant.
alpha : float
听音乐用英语怎么说The confidence intervals for the forecasts are (1 – alpha) %溃退
Returns:
forecast : array
Array of out of sample forecasts
拍卖行英文stderr : array
新视野大学英语1答案
Array of the standard error of the forecasts.
conf_int : array
haze
2d array of the confidence interval for the forecast
Notes
Prediction is done in the levels of the original endogenous variable. If you would like prediction of differences in levels u predict
Related

本文发布于:2023-06-14 09:57:06,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/144597.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:预测   模型   回归   分析   移动   遇到
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图