Update app.py
Browse files
app.py
CHANGED
@@ -37,6 +37,16 @@ def to_excel(df):
|
|
37 |
|
38 |
|
39 |
st.title("Exponential Smoothing Forecasting")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
# Upload Data Section
|
41 |
# uploaded_file = st.file_uploader("Choose a file")
|
42 |
# if uploaded_file is not None:
|
@@ -72,16 +82,6 @@ if forecast is not None:
|
|
72 |
fig = px.line(forecast_df, x=forecast_df.index, y="Forecast")
|
73 |
st.plotly_chart(fig)
|
74 |
|
75 |
-
# Grid search button
|
76 |
-
if st.button('Run Grid Search'):
|
77 |
-
best_aic = float('inf')
|
78 |
-
best_params = None
|
79 |
-
for param_set in product(['add', 'mul', None], [True, False], ['add', 'mul', None], [12]):
|
80 |
-
_, temp_aic = run_exp_smoothing(city_data, *param_set)
|
81 |
-
if temp_aic and temp_aic < best_aic:
|
82 |
-
best_aic = temp_aic
|
83 |
-
best_params = param_set
|
84 |
-
st.write(f"Best Parameters: {best_params} with AIC: {best_aic}")
|
85 |
|
86 |
# Export to Excel button
|
87 |
# if st.button('Export to Excel'):
|
|
|
37 |
|
38 |
|
39 |
st.title("Exponential Smoothing Forecasting")
|
40 |
+
# Grid search button
|
41 |
+
if st.button('Run Grid Search'):
|
42 |
+
best_aic = float('inf')
|
43 |
+
best_params = None
|
44 |
+
for param_set in product(['add', 'mul', None], [True, False], ['add', 'mul', None], [12]):
|
45 |
+
_, temp_aic = run_exp_smoothing(city_data, *param_set)
|
46 |
+
if temp_aic and temp_aic < best_aic:
|
47 |
+
best_aic = temp_aic
|
48 |
+
best_params = param_set
|
49 |
+
st.write(f"Best Parameters: {best_params} with AIC: {best_aic}")
|
50 |
# Upload Data Section
|
51 |
# uploaded_file = st.file_uploader("Choose a file")
|
52 |
# if uploaded_file is not None:
|
|
|
82 |
fig = px.line(forecast_df, x=forecast_df.index, y="Forecast")
|
83 |
st.plotly_chart(fig)
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
# Export to Excel button
|
87 |
# if st.button('Export to Excel'):
|