Circhastic commited on
Commit
33ff941
1 Parent(s): 6607488

Version 1 hotfix #28 for merge

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -195,17 +195,17 @@ def merge_forecast_data(actual, predicted, future):
195
  return merged_dataframe
196
 
197
  @st.cache_data
198
- def interpret_mape(mape):
199
- mape = mape * 100
200
- if mape < 10:
201
  interpretation = "Highly Accurate"
202
- elif mape < 20:
203
  interpretation = "Good Accuracy"
204
- elif mape < 50:
205
  interpretation = "Reasonable Accuracy"
206
  else:
207
  interpretation = "Inaccurate"
208
- return mape, interpretation
209
 
210
  # TAPAS Model
211
 
@@ -358,7 +358,7 @@ if (st.session_state.uploaded):
358
 
359
  test_y, predictions = np.array(test_y), np.array(fitted)
360
  score = forecast_accuracy(predictions, test_y)
361
- mape, interpretation = interpret_mape(score)
362
 
363
  col = st.columns(2)
364
  with col[0]:
 
195
  return merged_dataframe
196
 
197
  @st.cache_data
198
+ def interpret_mape(mape_score):
199
+ score = mape_score * 100
200
+ if score < 10:
201
  interpretation = "Highly Accurate"
202
+ elif score < 20:
203
  interpretation = "Good Accuracy"
204
+ elif score < 50:
205
  interpretation = "Reasonable Accuracy"
206
  else:
207
  interpretation = "Inaccurate"
208
+ return score, interpretation
209
 
210
  # TAPAS Model
211
 
 
358
 
359
  test_y, predictions = np.array(test_y), np.array(fitted)
360
  score = forecast_accuracy(predictions, test_y)
361
+ mape, interpretation = interpret_mape(score['mape'])
362
 
363
  col = st.columns(2)
364
  with col[0]: