add arima
Browse files
app.py
CHANGED
@@ -71,10 +71,9 @@ class TS:
|
|
71 |
df.index = df.ds
|
72 |
model = ARIMA(df.y, order = (1, 0, 7))
|
73 |
model = model.fit()
|
74 |
-
print(len(df))
|
75 |
forecast = pd.DataFrame()
|
76 |
predictions = model.forecast(period)
|
77 |
-
forecast["
|
78 |
forecast["ds"] = pd.date_range(start = df.index.max() + timedelta(days = 1), end = df.index.max() + timedelta(days = period))
|
79 |
|
80 |
return self.viz(df, forecast)
|
|
|
71 |
df.index = df.ds
|
72 |
model = ARIMA(df.y, order = (1, 0, 7))
|
73 |
model = model.fit()
|
|
|
74 |
forecast = pd.DataFrame()
|
75 |
predictions = model.forecast(period)
|
76 |
+
forecast["yhat"] = predictions
|
77 |
forecast["ds"] = pd.date_range(start = df.index.max() + timedelta(days = 1), end = df.index.max() + timedelta(days = period))
|
78 |
|
79 |
return self.viz(df, forecast)
|