openstef 3.4.51__py3-none-any.whl → 3.4.52__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -171,19 +171,19 @@ def r_mne_highest(realised: pd.Series, forecast: pd.Series) -> float:
171
171
 
172
172
  # Determine load range on entire dataset
173
173
  range_ = (
174
- combined["load"].max() - combined["load"].min()
175
- if (combined["load"].max() - combined["load"].min()) != 0
174
+ combined[realised.name].max() - combined[realised.name].min()
175
+ if (combined[realised.name].max() - combined[realised.name].min()) != 0
176
176
  else np.nan
177
177
  )
178
178
 
179
179
  # Select 5 percent highest realised load values
180
- combined["highest"] = combined["load"][
181
- combined["load"] > combined["load"].quantile(0.95)
180
+ combined["highest"] = combined[realised.name][
181
+ combined[realised.name] > combined[realised.name].quantile(0.95)
182
182
  ]
183
183
  combined = combined[np.invert(np.isnan(combined["highest"]))]
184
184
 
185
185
  # Calculate rMNE for the selected points
186
- diff = combined[forecast.name] - combined["load"]
186
+ diff = combined[forecast.name] - combined[realised.name]
187
187
 
188
188
  if len(diff[diff < 0]) < 2:
189
189
  return 0.0
@@ -208,20 +208,20 @@ def r_mpe_highest(realised: pd.Series, forecast: pd.Series) -> float:
208
208
 
209
209
  # Determine load range on entire dataset
210
210
  range_ = (
211
- combined["load"].max() - combined["load"].min()
212
- if (combined["load"].max() - combined["load"].min()) != 0
211
+ combined[realised.name].max() - combined[realised.name].min()
212
+ if (combined[realised.name].max() - combined[realised.name].min()) != 0
213
213
  else np.nan
214
214
  )
215
215
 
216
216
  # Select 5 percent highest realised load values
217
- combined["highest"] = combined["load"][
218
- combined["load"] > combined["load"].quantile(0.95)
217
+ combined["highest"] = combined[realised.name][
218
+ combined[realised.name] > combined[realised.name].quantile(0.95)
219
219
  ]
220
220
  combined = combined[np.invert(np.isnan(combined["highest"]))]
221
221
 
222
222
  # Calculate rMPE for the selected points
223
223
 
224
- diff = combined[forecast.name] - combined["load"]
224
+ diff = combined[forecast.name] - combined[realised.name]
225
225
 
226
226
  if len(diff[diff > 0]) < 2:
227
227
  return 0.0
@@ -282,13 +282,15 @@ def skill_score_positive_peaks(
282
282
  combined = pd.concat([realised, forecast], axis=1)
283
283
 
284
284
  # Select 5 percent highest realised load values
285
- combined["highest"] = combined["load"][
286
- combined["load"] > combined["load"].quantile(0.95)
285
+ combined["highest"] = combined[realised.name][
286
+ combined[realised.name] > combined[realised.name].quantile(0.95)
287
287
  ]
288
288
  combined = combined[np.invert(np.isnan(combined["highest"]))]
289
289
 
290
290
  # Calculate rMAE for the selected points
291
- skill_score_highest = skill_score(combined["load"], combined[forecast.name], mean)
291
+ skill_score_highest = skill_score(
292
+ combined[realised.name], combined[forecast.name], mean
293
+ )
292
294
 
293
295
  if np.isnan(skill_score_highest):
294
296
  return 0
@@ -304,8 +306,8 @@ def franks_skill_score(
304
306
  combined = pd.concat([realised, forecast], axis=1)
305
307
  if range_ == 1.0:
306
308
  range_ = (
307
- combined["load"].max() - combined["load"].min()
308
- if (combined["load"].max() - combined["load"].min()) != 0
309
+ combined[realised.name].max() - combined[realised.name].min()
310
+ if (combined[realised.name].max() - combined[realised.name].min()) != 0
309
311
  else np.nan
310
312
  )
311
313
 
@@ -325,19 +327,19 @@ def franks_skill_score_peaks(
325
327
  combined = pd.concat([realised, forecast, basecase], axis=1)
326
328
 
327
329
  range_ = (
328
- combined["load"].max() - combined["load"].min()
329
- if (combined["load"].max() - combined["load"].min()) != 0
330
+ combined[realised.name].max() - combined[realised.name].min()
331
+ if (combined[realised.name].max() - combined[realised.name].min()) != 0
330
332
  else np.nan
331
333
  )
332
334
  # Select 5 percent highest realised load values
333
- combined["highest"] = combined["load"][
334
- combined["load"] > combined["load"].quantile(0.95)
335
+ combined["highest"] = combined[realised.name][
336
+ combined[realised.name] > combined[realised.name].quantile(0.95)
335
337
  ]
336
338
  combined = combined[np.invert(np.isnan(combined["highest"]))]
337
339
 
338
340
  # Calculate rMAE for the selected points
339
341
  franks_skill_score_highest = franks_skill_score(
340
- combined["load"],
342
+ combined[realised.name],
341
343
  combined[forecast.name],
342
344
  combined[basecase.name],
343
345
  range_=range_,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: openstef
3
- Version: 3.4.51
3
+ Version: 3.4.52
4
4
  Summary: Open short term energy forecaster
5
5
  Home-page: https://github.com/OpenSTEF/openstef
6
6
  Author: Alliander N.V
@@ -33,7 +33,7 @@ openstef/feature_engineering/missing_values_transformer.py,sha256=o_zCVEOCPn2tWz
33
33
  openstef/feature_engineering/weather_features.py,sha256=Lr9DItyHvJ2CpWQ1r6A83tJKtR2k_Wwn32FdFTGblO0,15750
34
34
  openstef/metrics/__init__.py,sha256=bIyGTSA4V5VoOLTwdaiJJAnozmpSzvQooVYlsf8H4eU,163
35
35
  openstef/metrics/figure.py,sha256=KDoezYem9wdS13kUx7M7FOy-4u88Sg3OX1DuhNT6kgQ,9751
36
- openstef/metrics/metrics.py,sha256=si93EP2i34v3IPg-nOcm_aheoFAdu46i3azV_PjPmF8,15237
36
+ openstef/metrics/metrics.py,sha256=BsVrKalhgs20YsVBGyYZI2Uzor2nTPKTBCLHFCogCH8,15475
37
37
  openstef/metrics/reporter.py,sha256=w1Q6xWoYGmvnjwjXik-Gz7_gnb0lOeJMep-whEV5mNk,7897
38
38
  openstef/model/__init__.py,sha256=bIyGTSA4V5VoOLTwdaiJJAnozmpSzvQooVYlsf8H4eU,163
39
39
  openstef/model/basecase.py,sha256=caI6Q-8y0ymlxGK9Js_H3Vh0q6ruNHlGD5RG0_kE5M0,2878
@@ -93,8 +93,8 @@ openstef/tasks/utils/predictionjobloop.py,sha256=Ysy3zF5lzPMz_asYDKeF5m0qgVT3tCt
93
93
  openstef/tasks/utils/taskcontext.py,sha256=L9K14ycwgVxbIVUjH2DIn_QWbnu-OfxcGtQ1K9T6sus,5630
94
94
  openstef/validation/__init__.py,sha256=bIyGTSA4V5VoOLTwdaiJJAnozmpSzvQooVYlsf8H4eU,163
95
95
  openstef/validation/validation.py,sha256=HVgreHvcZvPazfwC3NNE8_3lsMsZEd_42osCAg1_6W4,11128
96
- openstef-3.4.51.dist-info/LICENSE,sha256=7Pm2fWFFHHUG5lDHed1vl5CjzxObIXQglnYsEdtjo_k,14907
97
- openstef-3.4.51.dist-info/METADATA,sha256=ed42n4dAuv1juArxfUH62jmnK5QfRV6qSJ6rZ5wVUUA,8305
98
- openstef-3.4.51.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
99
- openstef-3.4.51.dist-info/top_level.txt,sha256=kD0H4PqrQoncZ957FvqwfBxa89kTrun4Z_RAPs_HhLs,9
100
- openstef-3.4.51.dist-info/RECORD,,
96
+ openstef-3.4.52.dist-info/LICENSE,sha256=7Pm2fWFFHHUG5lDHed1vl5CjzxObIXQglnYsEdtjo_k,14907
97
+ openstef-3.4.52.dist-info/METADATA,sha256=r8E2LPnPIDJ-AhzrbVmYP3MPYIfx2OOpwIuYC9obtcE,8305
98
+ openstef-3.4.52.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
99
+ openstef-3.4.52.dist-info/top_level.txt,sha256=kD0H4PqrQoncZ957FvqwfBxa89kTrun4Z_RAPs_HhLs,9
100
+ openstef-3.4.52.dist-info/RECORD,,