MyEnny commited on
Commit
67917e9
·
verified ·
1 Parent(s): d187d14

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -68,7 +68,7 @@ def main():
68
  data['forecast'] = model.predict(features[model.feature_names_in_])
69
 
70
  # Calculate performance metrics
71
- latest_data = data.loc[data.index > pd.Timestamp.now(tz='UTC') - pd.Timedelta('1D')]
72
  rmse = np.sqrt((latest_data['power_consumption_kwh'] - latest_data['forecast'])**2).mean()
73
  mae = (latest_data['power_consumption_kwh'] - latest_data['forecast']).abs().mean()
74
  current_error = (data['power_consumption_kwh'].iloc[-1] - data['forecast'].iloc[-1]) / data['power_consumption_kwh'].iloc[-1] * 100
 
68
  data['forecast'] = model.predict(features[model.feature_names_in_])
69
 
70
  # Calculate performance metrics
71
+ latest_data = data.loc[data.index > pd.Timestamp.now(TIMEZONE) - pd.Timedelta('1D')]
72
  rmse = np.sqrt((latest_data['power_consumption_kwh'] - latest_data['forecast'])**2).mean()
73
  mae = (latest_data['power_consumption_kwh'] - latest_data['forecast']).abs().mean()
74
  current_error = (data['power_consumption_kwh'].iloc[-1] - data['forecast'].iloc[-1]) / data['power_consumption_kwh'].iloc[-1] * 100