openstef 3.4.48__py3-none-any.whl → 3.4.50__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.
@@ -40,13 +40,14 @@ def apply_features(
40
40
  pj: PredictionJobDataClass = None,
41
41
  feature_names: list[str] = None,
42
42
  horizon: float = 24.0,
43
+ years: list[int] | None = None,
43
44
  ) -> pd.DataFrame:
44
45
  """Applies the feature functions defined in ``feature_functions.py`` and returns the complete dataframe.
45
46
 
46
47
  Features requiring more recent label-data are omitted.
47
48
 
48
49
  .. note::
49
- For the time deriven features only the onces in the features list will be added. But for the weather features all will be added at present.
50
+ For the time derived features only the ones in the features list will be added. But for the weather features all will be added at present.
50
51
  These unrequested additional features have to be filtered out later.
51
52
 
52
53
  Args:
@@ -56,8 +57,9 @@ def apply_features(
56
57
  columns=[label, predictor_1,..., predictor_n]
57
58
  )
58
59
  pj (PredictionJobDataClass): Prediction job.
59
- feature_names (list[str]): list of reuqested features
60
+ feature_names (list[str]): list of requested features
60
61
  horizon (float): Forecast horizon limit in hours.
62
+ years (list[int] | None): years for which to create holiday features.
61
63
 
62
64
  Returns:
63
65
  pd.DataFrame(index = datetime, columns = [label, predictor_1,..., predictor_n, feature_1, ..., feature_m])
@@ -100,7 +102,7 @@ def apply_features(
100
102
 
101
103
  # Get holiday feature functions
102
104
  feature_functions.update(
103
- generate_holiday_feature_functions(country_code=country_code)
105
+ generate_holiday_feature_functions(country_code=country_code, years=years)
104
106
  )
105
107
 
106
108
  # Add the features to the dataframe using previously defined feature functions
@@ -15,7 +15,7 @@ HOLIDAY_CSV_PATH: str = PROJECT_ROOT / "openstef" / "data" / "dutch_holidays.csv
15
15
 
16
16
  def generate_holiday_feature_functions(
17
17
  country_code: str = "NL",
18
- years: list = None,
18
+ years: list[int] | None = None,
19
19
  path_to_school_holidays_csv: str = HOLIDAY_CSV_PATH,
20
20
  ) -> dict:
21
21
  """Generates functions for creating holiday feature.
@@ -48,9 +48,11 @@ def generate_holiday_feature_functions(
48
48
  The 'Brugdagen' are updated untill dec 2020. (Generated using agenda)
49
49
 
50
50
  Args:
51
- country: Country for which to create holiday features.
52
- years: years for which to create holiday features.
51
+ country_code: Country for which to create holiday features.
52
+ years: years for which to create holiday features. If None,
53
+ the last 4 years, the current and next year are used.
53
54
  path_to_school_holidays_csv: Filepath to csv with school holidays.
55
+
54
56
  NOTE: Dutch holidays csv file is only until January 2026.
55
57
 
56
58
  Returns:
@@ -65,7 +65,7 @@ def generate_fallback(
65
65
  .merge(
66
66
  highest_daily_loadprofile, left_on="time", right_on="time", how="outer"
67
67
  )
68
- .set_index("index")
68
+ .set_index(forecast.index)
69
69
  )
70
70
 
71
71
  # Rename so column is called forecast
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: openstef
3
- Version: 3.4.48
3
+ Version: 3.4.50
4
4
  Summary: Open short term energy forecaster
5
5
  Home-page: https://github.com/OpenSTEF/openstef
6
6
  Author: Alliander N.V
@@ -34,6 +34,17 @@ Requires-Dist: scipy~=1.10
34
34
  Requires-Dist: statsmodels<1.0.0,>=0.13.5
35
35
  Requires-Dist: structlog<25,>=23.1
36
36
  Requires-Dist: xgboost~=2.0
37
+ Dynamic: author
38
+ Dynamic: author-email
39
+ Dynamic: classifier
40
+ Dynamic: description
41
+ Dynamic: description-content-type
42
+ Dynamic: home-page
43
+ Dynamic: keywords
44
+ Dynamic: license
45
+ Dynamic: requires-dist
46
+ Dynamic: requires-python
47
+ Dynamic: summary
37
48
 
38
49
  <!--
39
50
  SPDX-FileCopyrightText: 2017-2023 Contributors to the OpenSTEF project <korte.termijn.prognoses@alliander.com>
@@ -20,14 +20,14 @@ openstef/data_classes/model_specifications.py,sha256=Uod1W3QzhRqVLb6zvXwxh9wRL3E
20
20
  openstef/data_classes/prediction_job.py,sha256=_o5_9HYv6ERTIWlcMpUE-mWwe7dRpaiP83dgNpqpa5Y,5657
21
21
  openstef/data_classes/split_function.py,sha256=ljQIQQu1t1Y_CVWGAy25jrM6wG9odIVVQVimrT1n-1s,3358
22
22
  openstef/feature_engineering/__init__.py,sha256=bIyGTSA4V5VoOLTwdaiJJAnozmpSzvQooVYlsf8H4eU,163
23
- openstef/feature_engineering/apply_features.py,sha256=S9HSsooDPcSSyEw9kixEhjjk3MAkAfyK1VhZKg5R0gA,4995
23
+ openstef/feature_engineering/apply_features.py,sha256=EIxP9fvmnAjFRehQpVGBhZHt35GACL-HhDm65_ktHc0,5121
24
24
  openstef/feature_engineering/bidding_zone_to_country_mapping.py,sha256=u9aabjFDImydkO6_cXiaQxBT4gb5zy0gGTg2EoIUO_Y,2106
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
28
  openstef/feature_engineering/feature_applicator.py,sha256=DR7jayrEMlra4BFL1Ps5WV2fxbkQ6VaOTa5RIKM-YNk,7447
29
29
  openstef/feature_engineering/general.py,sha256=tgU4_1stag9jJmaQAfWCMhfBscznVuQvW5hPK_z9_9g,4438
30
- openstef/feature_engineering/holiday_features.py,sha256=q_wJvKaVUd54GjPo3qEt1No_XsQ9d1oNmNNJD3AIHtE,8181
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
33
  openstef/feature_engineering/weather_features.py,sha256=Lr9DItyHvJ2CpWQ1r6A83tJKtR2k_Wwn32FdFTGblO0,15750
@@ -38,7 +38,7 @@ openstef/metrics/reporter.py,sha256=w1Q6xWoYGmvnjwjXik-Gz7_gnb0lOeJMep-whEV5mNk,
38
38
  openstef/model/__init__.py,sha256=bIyGTSA4V5VoOLTwdaiJJAnozmpSzvQooVYlsf8H4eU,163
39
39
  openstef/model/basecase.py,sha256=caI6Q-8y0ymlxGK9Js_H3Vh0q6ruNHlGD5RG0_kE5M0,2878
40
40
  openstef/model/confidence_interval_applicator.py,sha256=Bx0mm4zGKlqopMZ589cVyDN_k6jfuyqtV1FoViXxc2Y,9775
41
- openstef/model/fallback.py,sha256=VV9ehgnoMZtWzqKk9H1t8wnERFh5CyC4TvDIuRP_ZDI,2861
41
+ openstef/model/fallback.py,sha256=WfmRhX_Ec6m-bTrJtrYrK_xbBKEPJRN7MrNGkRJ2_o4,2868
42
42
  openstef/model/model_creator.py,sha256=EHWB5bIq9yYfWJpMWg62K5fns1p3aHFFB7_Izt2VWnA,6018
43
43
  openstef/model/objective.py,sha256=qJdI6GAzv8l5Mxd8G7BIqQnfdJNM7aOlg9DMzMGjWqA,14558
44
44
  openstef/model/objective_creator.py,sha256=cIO-uiCEYHjqYrgZizeFEjjgLHLLwab8le9O8DJOF8I,2145
@@ -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.48.dist-info/LICENSE,sha256=7Pm2fWFFHHUG5lDHed1vl5CjzxObIXQglnYsEdtjo_k,14907
97
- openstef-3.4.48.dist-info/METADATA,sha256=w22ao36-l9Y4HXpsHvVZ8G9k3_3Iqt2EJ8-dGoArWIs,8073
98
- openstef-3.4.48.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
99
- openstef-3.4.48.dist-info/top_level.txt,sha256=kD0H4PqrQoncZ957FvqwfBxa89kTrun4Z_RAPs_HhLs,9
100
- openstef-3.4.48.dist-info/RECORD,,
96
+ openstef-3.4.50.dist-info/LICENSE,sha256=7Pm2fWFFHHUG5lDHed1vl5CjzxObIXQglnYsEdtjo_k,14907
97
+ openstef-3.4.50.dist-info/METADATA,sha256=HiJrf8jbS7ZeoZS-RODtWoXjcBRfDKqwIDQ2dm4J1Yo,8305
98
+ openstef-3.4.50.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
99
+ openstef-3.4.50.dist-info/top_level.txt,sha256=kD0H4PqrQoncZ957FvqwfBxa89kTrun4Z_RAPs_HhLs,9
100
+ openstef-3.4.50.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5