Spaces:
Running
Running
Circhastic
commited on
Commit
•
916d7d9
1
Parent(s):
0751948
v1.1 release fix
Browse files
app.py
CHANGED
@@ -135,7 +135,7 @@ def train_test(dataframe, n):
|
|
135 |
|
136 |
@st.cache_data
|
137 |
def test_fitting(dataframe, Exo, trainY):
|
138 |
-
trainTestModel = auto_arima(X = Exo, y = trainY, start_p=
|
139 |
test='adf',min_p=1,min_q=1,
|
140 |
max_p=3, max_q=3, m=12,
|
141 |
start_P=2, start_Q=2, seasonal=True,
|
@@ -146,8 +146,6 @@ def test_fitting(dataframe, Exo, trainY):
|
|
146 |
model = trainTestModel
|
147 |
return model
|
148 |
|
149 |
-
|
150 |
-
@st.cache_data
|
151 |
def forecast_accuracy(forecast, actual):
|
152 |
mape = np.mean(np.abs(forecast - actual)/np.abs(actual)).round(4) # MAPE
|
153 |
rmse = (np.mean((forecast - actual)**2)**.5).round(2) # RMSE
|
@@ -206,7 +204,6 @@ def merge_forecast_data(actual, predicted, future): # debug
|
|
206 |
print(merged_dataframe)
|
207 |
return merged_dataframe
|
208 |
|
209 |
-
@st.cache_data
|
210 |
def interpret_mape(mape_score):
|
211 |
score = (mape_score * 100).round(2)
|
212 |
if score < 10:
|
|
|
135 |
|
136 |
@st.cache_data
|
137 |
def test_fitting(dataframe, Exo, trainY):
|
138 |
+
trainTestModel = auto_arima(X = Exo, y = trainY, start_p=1, start_q=1,
|
139 |
test='adf',min_p=1,min_q=1,
|
140 |
max_p=3, max_q=3, m=12,
|
141 |
start_P=2, start_Q=2, seasonal=True,
|
|
|
146 |
model = trainTestModel
|
147 |
return model
|
148 |
|
|
|
|
|
149 |
def forecast_accuracy(forecast, actual):
|
150 |
mape = np.mean(np.abs(forecast - actual)/np.abs(actual)).round(4) # MAPE
|
151 |
rmse = (np.mean((forecast - actual)**2)**.5).round(2) # RMSE
|
|
|
204 |
print(merged_dataframe)
|
205 |
return merged_dataframe
|
206 |
|
|
|
207 |
def interpret_mape(mape_score):
|
208 |
score = (mape_score * 100).round(2)
|
209 |
if score < 10:
|