openstef 3.4.58__py3-none-any.whl → 3.4.59__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.
- openstef/feature_engineering/rolling_features.py +8 -4
- {openstef-3.4.58.dist-info → openstef-3.4.59.dist-info}/METADATA +1 -1
- {openstef-3.4.58.dist-info → openstef-3.4.59.dist-info}/RECORD +6 -6
- {openstef-3.4.58.dist-info → openstef-3.4.59.dist-info}/LICENSE +0 -0
- {openstef-3.4.58.dist-info → openstef-3.4.59.dist-info}/WHEEL +0 -0
- {openstef-3.4.58.dist-info → openstef-3.4.59.dist-info}/top_level.txt +0 -0
@@ -49,10 +49,14 @@ def add_rolling_aggregate_features(
|
|
49
49
|
|
50
50
|
if "load" not in data.columns:
|
51
51
|
raise ValueError("The DataFrame must contain a 'load' column.")
|
52
|
-
|
52
|
+
|
53
|
+
# remove rows with NaN values in the load column for rolling window calculation
|
54
|
+
rolling_window_load = data["load"].dropna().rolling(window=rolling_window)
|
53
55
|
|
54
56
|
for aggregate_func in pj["rolling_aggregate_features"]:
|
55
|
-
|
56
|
-
|
57
|
-
|
57
|
+
col_name = f"rolling_{aggregate_func.value}_load_{convert_timedelta_to_isoformat(rolling_window)}"
|
58
|
+
data[col_name] = rolling_window_load.aggregate(aggregate_func.value)
|
59
|
+
# Fill missing values with the last known value
|
60
|
+
data[col_name] = data[col_name].ffill()
|
61
|
+
|
58
62
|
return data
|
@@ -30,7 +30,7 @@ openstef/feature_engineering/general.py,sha256=tgU4_1stag9jJmaQAfWCMhfBscznVuQvW
|
|
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
|
32
32
|
openstef/feature_engineering/missing_values_transformer.py,sha256=o_zCVEOCPn2tWzvlY44XZuDysV0TuxqeVYhilYU54YY,5010
|
33
|
-
openstef/feature_engineering/rolling_features.py,sha256=
|
33
|
+
openstef/feature_engineering/rolling_features.py,sha256=DTcrwJK1jf3-byg9ufiT7I5B-G8TFk4-VcK17AEdtYo,2160
|
34
34
|
openstef/feature_engineering/weather_features.py,sha256=Lr9DItyHvJ2CpWQ1r6A83tJKtR2k_Wwn32FdFTGblO0,15750
|
35
35
|
openstef/metrics/__init__.py,sha256=bIyGTSA4V5VoOLTwdaiJJAnozmpSzvQooVYlsf8H4eU,163
|
36
36
|
openstef/metrics/figure.py,sha256=KDoezYem9wdS13kUx7M7FOy-4u88Sg3OX1DuhNT6kgQ,9751
|
@@ -95,8 +95,8 @@ openstef/tasks/utils/predictionjobloop.py,sha256=Ysy3zF5lzPMz_asYDKeF5m0qgVT3tCt
|
|
95
95
|
openstef/tasks/utils/taskcontext.py,sha256=L9K14ycwgVxbIVUjH2DIn_QWbnu-OfxcGtQ1K9T6sus,5630
|
96
96
|
openstef/validation/__init__.py,sha256=bIyGTSA4V5VoOLTwdaiJJAnozmpSzvQooVYlsf8H4eU,163
|
97
97
|
openstef/validation/validation.py,sha256=6FY-mD7bWxM7NpM9y-RcGZJt-kyyOmPl8QSemYRY11w,11200
|
98
|
-
openstef-3.4.
|
99
|
-
openstef-3.4.
|
100
|
-
openstef-3.4.
|
101
|
-
openstef-3.4.
|
102
|
-
openstef-3.4.
|
98
|
+
openstef-3.4.59.dist-info/LICENSE,sha256=7Pm2fWFFHHUG5lDHed1vl5CjzxObIXQglnYsEdtjo_k,14907
|
99
|
+
openstef-3.4.59.dist-info/METADATA,sha256=brzxpOXqW6aueefOv9PtIc9WxfERanfK5JK0aEQnNbU,8305
|
100
|
+
openstef-3.4.59.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
101
|
+
openstef-3.4.59.dist-info/top_level.txt,sha256=kD0H4PqrQoncZ957FvqwfBxa89kTrun4Z_RAPs_HhLs,9
|
102
|
+
openstef-3.4.59.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|