openstef 3.4.53__py3-none-any.whl → 3.4.54__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.
@@ -24,7 +24,9 @@ from openstef.feature_engineering.general import (
24
24
  remove_non_requested_feature_columns,
25
25
  )
26
26
 
27
- LATENCY_CONFIG = {"APX": 24} # A specific latency is part of a specific feature.
27
+ LATENCY_CONFIG = {
28
+ "day_ahead_electricity_price": 24
29
+ } # A specific latency is part of a specific feature.
28
30
 
29
31
 
30
32
  class AbstractFeatureApplicator(ABC):
@@ -94,7 +96,7 @@ class TrainFeatureApplicator(AbstractFeatureApplicator):
94
96
  if not specified a default location is used
95
97
  latency_config: (Optional) Invalidate certain features that are not
96
98
  available for a specific horizon due to data latency. Defaults to
97
- ``{"APX": 24}``.
99
+ ``{"day_ahead_electricity_price": 24}``.
98
100
 
99
101
  Returns:
100
102
  Input DataFrame with an extra column for every added feature and sorted on the datetime index.
@@ -93,7 +93,7 @@ class LinearQuantileOpenstfRegressor(OpenstfRegressor, RegressorMixin):
93
93
  )
94
94
 
95
95
  if clipped_features is None:
96
- clipped_features = ["APX"]
96
+ clipped_features = ["day_ahead_electricity_price"]
97
97
 
98
98
  self.quantiles = quantiles
99
99
  self.alpha = alpha
@@ -6,7 +6,7 @@
6
6
  This code assumes trained models are available from the persistent storage.
7
7
  If these are not available run model_train.py to train all models.
8
8
  To provide the prognoses the following steps are carried out:
9
- 1. Get historic training data (TDCV, Load, Weather and APX price data)
9
+ 1. Get historic training data (TDCV, Load, Weather and day_ahead_electricity_price price data)
10
10
  2. Apply features
11
11
  3. Load model
12
12
  4. Make component prediction
@@ -6,7 +6,7 @@
6
6
  This code assumes trained models are available from the persistent storage. If these
7
7
  are not available run model_train.py to train all models.
8
8
  To provide the prognoses the folowing steps are carried out:
9
- 1. Get historic training data (TDCV, Load, Weather and APX price data)
9
+ 1. Get historic training data (TDCV, Load, Weather and day_ahead_electricity_price price data)
10
10
  2. Apply features
11
11
  3. Load model
12
12
  4. Make prediction
@@ -24,7 +24,7 @@ from datetime import datetime, timedelta
24
24
  from pathlib import Path
25
25
 
26
26
  from openstef.data_classes.prediction_job import PredictionJobDataClass
27
- from openstef.enums import ModelType, PipelineType
27
+ from openstef.enums import BiddingZone, ModelType, PipelineType
28
28
  from openstef.exceptions import InputDataOngoingZeroFlatlinerError
29
29
  from openstef.pipeline.create_forecast import create_forecast_pipeline
30
30
  from openstef.tasks.utils.predictionjobloop import PredictionJobLoop
@@ -82,8 +82,13 @@ def create_forecast_task(
82
82
  location=[pj["lat"], pj["lon"]],
83
83
  datetime_start=datetime_start,
84
84
  datetime_end=datetime_end,
85
+ market_price=pj.electricity_bidding_zone.value,
85
86
  )
86
87
 
88
+ # Add APX price to the input data for backward compatibility,remove this line when all models are retrained
89
+ if pj.electricity_bidding_zone == BiddingZone.NL:
90
+ input_data["APX"] = input_data["day_ahead_electricity_price"]
91
+
87
92
  try:
88
93
  # Make forecast with the forecast pipeline
89
94
  forecast = create_forecast_pipeline(
@@ -4,7 +4,7 @@
4
4
  """This module contains the CRON job that is periodically executed to retrain the prognosis models.
5
5
 
6
6
  For this the folowing steps are caried out:
7
- 1. Get historic training data (TDCV, Load, Weather and APX price data)
7
+ 1. Get historic training data (TDCV, Load, Weather and day_ahead_electricity_price price data)
8
8
  2. Apply features
9
9
  3. Train and Test the new model
10
10
  4. Check if new model performs better than the old model
@@ -313,9 +313,9 @@ def calc_completeness_dataframe(
313
313
  expected_numbers_timedelayed=value,
314
314
  )
315
315
 
316
- # Correct for APX being only expected to be available up to 24h
317
- if "APX" in non_na_count.index:
318
- non_na_count["APX"] += max([len(df) - 96, 0])
316
+ # Correct for day_ahead_electricity_price being only expected to be available up to 24h
317
+ if "day_ahead_electricity_price" in non_na_count.index:
318
+ non_na_count["day_ahead_electricity_price"] += max([len(df) - 96, 0])
319
319
 
320
320
  completeness_per_column_dataframe = non_na_count / (len(df))
321
321
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: openstef
3
- Version: 3.4.53
3
+ Version: 3.4.54
4
4
  Summary: Open short term energy forecaster
5
5
  Home-page: https://github.com/OpenSTEF/openstef
6
6
  Author: Alliander N.V
@@ -25,7 +25,7 @@ openstef/feature_engineering/bidding_zone_to_country_mapping.py,sha256=u9aabjFDI
25
25
  openstef/feature_engineering/cyclic_features.py,sha256=0Z3wZeF_qrkmEcOq91gtdSMZucAq99kUoBuFDV0SHqk,5962
26
26
  openstef/feature_engineering/data_preparation.py,sha256=htca9LBO3ZN1D-iX4vXf0UN1fw_rRO7y6N3AuYVMpfk,5628
27
27
  openstef/feature_engineering/feature_adder.py,sha256=aSqDl_gUrB3H2TD3cNvU5JniY_KOb4u4a2A6J7zB2BQ,6835
28
- openstef/feature_engineering/feature_applicator.py,sha256=DR7jayrEMlra4BFL1Ps5WV2fxbkQ6VaOTa5RIKM-YNk,7447
28
+ openstef/feature_engineering/feature_applicator.py,sha256=bU1Pu5V1fxMCQCwh6HG66nmctBjrNa7gHUYqOqPmLTU,7501
29
29
  openstef/feature_engineering/general.py,sha256=tgU4_1stag9jJmaQAfWCMhfBscznVuQvW5hPK_z9_9g,4438
30
30
  openstef/feature_engineering/holiday_features.py,sha256=CbolIP5bfiQkqDct-9TbD828-lhC48bfeNQ2-VFnsJA,8274
31
31
  openstef/feature_engineering/lag_features.py,sha256=Dr6qS8UhdgEHPZZSe-w6ibtjl_lcbcQohhqdZN9fqEU,5652
@@ -56,7 +56,7 @@ openstef/model/regressors/flatliner.py,sha256=T9u-ukhqFcatQmlgUtBL_G-1b_wQzgdVRq
56
56
  openstef/model/regressors/gblinear_quantile.py,sha256=DSRjL_kadBfDKrDEgrOfU1N60grTiAovtcBszBa41TI,11271
57
57
  openstef/model/regressors/lgbm.py,sha256=zCdn1euEdSFxYJzH8XqQFFnb6R4JVUnmineKjX_Gy-g,800
58
58
  openstef/model/regressors/linear.py,sha256=uOvZMLGZH_9nXfmS5honCMfyVeyGXP1Cza9A_BdXlVw,3665
59
- openstef/model/regressors/linear_quantile.py,sha256=VAyIhp7GPayqbk8Vj_ONqPLNYuaOvxkFKDrRxx6yGY0,10510
59
+ openstef/model/regressors/linear_quantile.py,sha256=sI5cl6_W-hh13mg4Gf09LQ1caZmBy7COc8_5BBJxySQ,10534
60
60
  openstef/model/regressors/regressor.py,sha256=uJcx59AyCPE9f_yPcAQ59h2ZS7eNsDpIHJrladKvHIw,3461
61
61
  openstef/model/regressors/xgb.py,sha256=SH-UiYJtMbfmRBK6738dU0ZRfYfzNynnikwbxINCE7Q,1467
62
62
  openstef/model/regressors/xgb_multioutput_quantile.py,sha256=xWzA7tymC_o-F1OS3I7vUKf9zP6RR1ZglEeY4NAgjU0,9146
@@ -81,21 +81,21 @@ openstef/preprocessing/preprocessing.py,sha256=bM_cSSSb2vGTD79RGzUrI6KoELbzlCyJw
81
81
  openstef/tasks/__init__.py,sha256=bIyGTSA4V5VoOLTwdaiJJAnozmpSzvQooVYlsf8H4eU,163
82
82
  openstef/tasks/calculate_kpi.py,sha256=O8m-K7lmkU3tY2H4E3gLqRAhhALZ75Y18x8Y_-D8Htw,11876
83
83
  openstef/tasks/create_basecase_forecast.py,sha256=rexAt6jGbW3YTXvDo606rzJvYETCoLVYCsBRihZas9U,4213
84
- openstef/tasks/create_components_forecast.py,sha256=Gyhrb_l3HGLBD5loUZt_3bYoPqMlmcVGJbEd5I8_A38,6155
85
- openstef/tasks/create_forecast.py,sha256=gLH3Z-t3fkFjYUyxiLXlywZ2fd9Dnhqq84C0UEO31g4,5766
84
+ openstef/tasks/create_components_forecast.py,sha256=bhBVN1v8mhBQhYP1fBfbhag58DmQlxSKDTSz5YfTYGc,6179
85
+ openstef/tasks/create_forecast.py,sha256=OOXfM3wTPEMa5CnlFPXNPe9kNN4LQG-3fHbeAUsiOKo,6096
86
86
  openstef/tasks/create_solar_forecast.py,sha256=cZiIoCVHlLlDrsWeH3ZX4zfcMMrgGgqkG2CmbCp8lqM,15074
87
87
  openstef/tasks/create_wind_forecast.py,sha256=RhshkmNSyFWx4Y6yQn02GzHjWTREbN5A5GAeWv0JpcE,2907
88
88
  openstef/tasks/optimize_hyperparameters.py,sha256=meiOn5S4yBrk5ANCFwcBCfTZIhm-b1rdh9TFh7KFr3E,4754
89
89
  openstef/tasks/split_forecast.py,sha256=AF_AwFcD6BqOrfvNLhIm_8gb7SpyKxEx60mymoxohPg,9323
90
- openstef/tasks/train_model.py,sha256=o8QVPReJ71BZVCOL6Rs3PFD9Zg4LT16dPcbf87xnXpA,8494
90
+ openstef/tasks/train_model.py,sha256=PLkZMMZppsHuc2miCKDeVKoPhrwZi68xXL0axH2cDoA,8518
91
91
  openstef/tasks/utils/__init__.py,sha256=bIyGTSA4V5VoOLTwdaiJJAnozmpSzvQooVYlsf8H4eU,163
92
92
  openstef/tasks/utils/dependencies.py,sha256=Jy9dtV_G7lTEa5Cdy--wvMxJuAb0adb3R0X4QDjVteM,3077
93
93
  openstef/tasks/utils/predictionjobloop.py,sha256=Ysy3zF5lzPMz_asYDKeF5m0qgVT3tCtwSPihqMjnI5Q,9580
94
94
  openstef/tasks/utils/taskcontext.py,sha256=L9K14ycwgVxbIVUjH2DIn_QWbnu-OfxcGtQ1K9T6sus,5630
95
95
  openstef/validation/__init__.py,sha256=bIyGTSA4V5VoOLTwdaiJJAnozmpSzvQooVYlsf8H4eU,163
96
- openstef/validation/validation.py,sha256=HVgreHvcZvPazfwC3NNE8_3lsMsZEd_42osCAg1_6W4,11128
97
- openstef-3.4.53.dist-info/LICENSE,sha256=7Pm2fWFFHHUG5lDHed1vl5CjzxObIXQglnYsEdtjo_k,14907
98
- openstef-3.4.53.dist-info/METADATA,sha256=MCAC7JnwfKToob21A5_a-eFE4CkG7PJ3Wov0BIDJ6Uc,8305
99
- openstef-3.4.53.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
100
- openstef-3.4.53.dist-info/top_level.txt,sha256=kD0H4PqrQoncZ957FvqwfBxa89kTrun4Z_RAPs_HhLs,9
101
- openstef-3.4.53.dist-info/RECORD,,
96
+ openstef/validation/validation.py,sha256=6FY-mD7bWxM7NpM9y-RcGZJt-kyyOmPl8QSemYRY11w,11200
97
+ openstef-3.4.54.dist-info/LICENSE,sha256=7Pm2fWFFHHUG5lDHed1vl5CjzxObIXQglnYsEdtjo_k,14907
98
+ openstef-3.4.54.dist-info/METADATA,sha256=AfvDSH_-juUUnXxlNW1Rvo-SZtujHl6YG6xcZ5VOSz8,8305
99
+ openstef-3.4.54.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
100
+ openstef-3.4.54.dist-info/top_level.txt,sha256=kD0H4PqrQoncZ957FvqwfBxa89kTrun4Z_RAPs_HhLs,9
101
+ openstef-3.4.54.dist-info/RECORD,,