arima

Multiple inputs into Statsmodels ARIMA in Python

蓝咒 提交于 2020-01-03 06:01:10
问题 I am trying to fit a ARIMA model with multiple inputs. As long as the input was a single array it worked fine. Here, I was adviced to put input arrays into a multidimensional array-like structure. So I did: import numpy as np from statsmodels.tsa.arima_model import ARIMA a = [1, 2, 3] b = [4, 5, 6] data = np.dstack([a, b]) for p in range(6): for d in range(2): for q in range(4): order = (p,d,q) try: model = ARIMA(data, order=(p,d,q)) print("this works:{}, {}, {} ".format(p,d,q)) except: pass

Multiple inputs into Statsmodels ARIMA in Python

纵然是瞬间 提交于 2020-01-03 06:01:05
问题 I am trying to fit a ARIMA model with multiple inputs. As long as the input was a single array it worked fine. Here, I was adviced to put input arrays into a multidimensional array-like structure. So I did: import numpy as np from statsmodels.tsa.arima_model import ARIMA a = [1, 2, 3] b = [4, 5, 6] data = np.dstack([a, b]) for p in range(6): for d in range(2): for q in range(4): order = (p,d,q) try: model = ARIMA(data, order=(p,d,q)) print("this works:{}, {}, {} ".format(p,d,q)) except: pass

display predicted values for initial data using auto.arima in R

家住魔仙堡 提交于 2019-12-20 04:53:04
问题 Let's work with this data sample timeseries<-structure(list(Data = structure(c(10L, 14L, 18L, 22L, 26L, 29L, 32L, 35L, 38L, 1L, 4L, 7L, 11L, 15L, 19L, 23L, 27L, 30L, 33L, 36L, 39L, 2L, 5L, 8L, 12L, 16L, 20L, 24L, 28L, 31L, 34L, 37L, 40L, 3L, 6L, 9L, 13L, 17L, 21L, 25L), .Label = c("01.01.2018", "01.01.2019", "01.01.2020", "01.02.2018", "01.02.2019", "01.02.2020", "01.03.2018", "01.03.2019", "01.03.2020", "01.04.2017", "01.04.2018", "01.04.2019", "01.04.2020", "01.05.2017", "01.05.2018", "01

ARIMA produced slope straight line

我们两清 提交于 2019-12-20 03:53:23
问题 I am new to the time series with using the SARIMA model, and I followed the tutorial to build the model and trying to forecast the future trend. The thing goes well at the beginning but when produced the results it shows the slope straight line. and I build it on the Jupyter NoteBook First thing I checked my data, and make the data visually, but in fact, it seems the right data then I tried to change the values of P, D, Q and failed again https://github.com/Dongmingguoguo/Prediciton https:/

module 'statsmodels.tsa.arima_model' has no arguments 'seasonal', 'xreg', 'xtransf', 'transfer' and 'include.mean'

泪湿孤枕 提交于 2019-12-13 09:49:19
问题 I'm trying to rebuild a ARIMA by python('statsmodels.tsa.arima_model') (had build in r by arima). The question is, there is no similar arguments('seasonal', 'xreg', 'xtransf', 'transfer' and 'include.mean') in python to make it work as in r, so anyone could teach me? thanks! 来源: https://stackoverflow.com/questions/59046327/module-statsmodels-tsa-arima-model-has-no-arguments-seasonal-xreg-xtran

meaning of stationary=TRUE in auto.arima function

会有一股神秘感。 提交于 2019-12-11 17:25:09
问题 I have this data which is residual series obtained from predicted values and observations. original series was a random walk with a very small drift(mean=0.0025). err <- ts(c(0.6100, 1.3500, 1.0300, 0.9600, 1.1100, 0.8350 , 0.8800 , 1.0600 , 1.3800 , 1.6200, 1.5800 , 1.2800 , 1.3000 , 1.4300 , 2.1500 , 1.9100 , 1.8300 , 1.9500 ,1.9999, 1.8500 , 1.5500 , 1.9800 ,1.7044 ,1.8593 , 1.9900 , 2.0400, 1.8950, 2.0100 , 1.6900 , 2.1800 ,2.2150, 2.1293 , 2.1000 , 2.1200 , 2.0500 , 1.9000, 1.8350, 1

How to use Arima for data with 2 indexes

岁酱吖の 提交于 2019-12-11 16:54:44
问题 I have a time series problem that is a little modified. I have 2 indexed variables, date and user id. for each user id, date, i want to forecast a value. The interesting part is the date resets for each new user id. Standard time series problem have for this time period, forecast the next n days. In my train data, i have for each user id, for jan 1-3, i have their target value. In my test data, for each user id, test date is jan 4-6. For both the train and test data, index of the dataframe is

Do we need to do differencing of exogenous variables before passing to xreg argument of Arima() in R?

与世无争的帅哥 提交于 2019-12-10 11:38:22
问题 I am trying to build a forecasting model using ARIMAX in R and require some guidance on how covariates are handled in xreg argument. I understand that, auto.arima function takes care of differencing of covariates while fitting the model (from training period data) and I also don't need to difference the covariates for generating forecasts for test period (future values). However, while fitting the model using Arima() in R with custom (p, d, q) and (P, D, Q)[m] values with d or D greater than

Statsmodel ARIMA multiple input

北战南征 提交于 2019-12-08 11:28:13
问题 I want to create my first (seasonal) ARIMA model but I find the Statsmodel ARIMA documentation insufficient. I lack information about calculating the prediction from multiple arrays (these are numpy arrays). These numpy arrays are series of values for each minute of a day. I want to make the prediction using data from each day of the last year. Any advice/suggestions/links/hints on how to do that? I am using Python 3.6. 回答1: You will need to put your arrays into a single multidimensional

时间序列预测算法总结

。_饼干妹妹 提交于 2019-12-07 21:59:58
时间序列算法 time series data mining 主要包括 decompose (分析数据的各个成分,例如趋势,周期性), prediction (预测未来的值), classification (对有序数据序列的 feature 提取与分类), clustering (相似数列聚类)等。 时间序列的预测 常用的思路: 1、计算平均值 2、 exponential smoothing 指数衰减 不同的时间点,赋予不同的权重,越接近权重越高 3、snaive:假设已知数据的周期,上一个周期对应的值作为下一个周期的预测值 4、drift:飘移,即用最后一个点的值加上数据的平均趋势 5、Holt-Winters: 三阶指数平滑 Holt-Winters的思想是把数据分解成三个成分:平均水平(level),趋势(trend),周期性(seasonality)。R里面一个简单的函数stl就可以把原始数据进行分解: 一阶Holt—Winters假设数据是stationary的(静态分布),即是普通的指数平滑。 二阶算法假设数据有一个趋势,这个趋势可以是加性的(additive,线性趋势),也可以是乘性的(multiplicative,非线性趋势),只是公式里面一个小小的不同而已。 三阶算法在二阶的假设基础上,多了一个周期性的成分