Skip to content

Commit

Permalink
Merge pull request #431 from kperrynrel/xgboost-update
Browse files Browse the repository at this point in the history
Updated the xgboost model version + removed experimental filter warnings
  • Loading branch information
mdeceglie authored Oct 16, 2024
2 parents 841cbec + a816d43 commit a46b348
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 18 deletions.
3 changes: 2 additions & 1 deletion docs/sphinx/source/changelog/pending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ have been updated (:pull:`412`, :pull:`428`)
* Updated scikit-learn==1.1.3 in ``requirements_min.txt`` (:pull:`428`)
* Updated arch==4.11 in ``requirements_min.txt`` (:pull:`428`)
* Updated filterpy==1.4.5 in ``requirements_min.txt`` (:pull:`428`)
* Updated xgboost==1.6.0 in ``requirements_min.txt`` (:pull:`431`)

* Updated appnope==0.1.4 in ``notebook_requirements.txt`` (:pull:`428`)
* Updated argon2-cffi==23.1.0 in ``notebook_requirements.txt`` (:pull:`428`)
Expand Down Expand Up @@ -151,7 +152,7 @@ have been updated (:pull:`412`, :pull:`428`)
* Updated scipy >= 1.8.1 in INSTALL_REQUIRES (:pull:`428`)
* Updated h5py >= 3.7.0 in INSTALL_REQUIRES (:pull:`428`)
* Updated plotly>=4.0.0 in INSTALL_REQUIRES (:pull:`428`)
* Updated xgboost >= 1.3.3 in INSTALL_REQUIRES (:pull:`428`)
* Updated xgboost >= 1.6.0 in INSTALL_REQUIRES (:pull:`431`)
* Updated pvlib >= 0.9.0, <0.12.0 in INSTALL_REQUIRES (:pull:`428`)
* Updated scikit-learn >= 1.1.3 in INSTALL_REQUIRES (:pull:`428`)
* Updated sphinx==8.0.2 in EXTRAS_REQUIRE (:pull:`428`)
Expand Down
12 changes: 0 additions & 12 deletions rdtools/filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,11 +572,6 @@ def logic_clip_filter(
detection techniques in AC power time series", 2021 IEEE 48th Photovoltaic
Specialists Conference (PVSC). DOI: 10.1109/PVSC43889.2021.9518733.
"""
# Throw a warning that this is still an experimental filter. (Removed for 3.0.0)
# warnings.warn("The logic-based filter is an experimental clipping filter "
# "that is still under development. The API, results, and "
# "default behaviors may change in future releases (including "
# "MINOR and PATCH). Use at your own risk!")
# Format the time series
power_ac, index_name = _format_clipping_time_series(power_ac, mounting_type)
# Test if the data sampling frequency is variable, and flag it if the time
Expand Down Expand Up @@ -808,13 +803,6 @@ def xgboost_clip_filter(power_ac, mounting_type="fixed"):
detection techniques in AC power time series", 2021 IEEE 48th Photovoltaic
Specialists Conference (PVSC). DOI: 10.1109/PVSC43889.2021.9518733.
"""
# Throw a warning that this is still an experimental filter
warnings.warn(
"The XGBoost filter is an experimental clipping filter "
"that is still under development. The API, results, and "
"default behaviors may change in future releases (including "
"MINOR and PATCH). Use at your own risk!"
)
# Load in the XGBoost model
xgboost_clipping_model = _load_xgboost_clipping_model()
# Format the power or energy time series
Expand Down
2 changes: 1 addition & 1 deletion rdtools/models/xgboost_clipping_model.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions rdtools/test/filtering_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,7 @@ def test_xgboost_clip_filter(generate_power_time_series_no_clipping,
with warnings.catch_warnings(record=True) as record:
xgboost_clip_filter(power_nc_tz_naive)
# Warning thrown for it being an experimental filter + tz-naive
assert_warnings(['The XGBoost filter is an experimental',
'Function expects timestamps in local time'],
assert_warnings(['Function expects timestamps in local time'],
record)
# Scramble the index and run through the filter. This should throw
# an IndexError.
Expand Down
2 changes: 1 addition & 1 deletion requirements-min.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ statsmodels==0.13.5
scipy==1.8.1
h5py==3.7.0
plotly==4.0.0
xgboost==1.3.3
xgboost==1.6.0
pvlib==0.11.0
scikit-learn==1.1.3
arch==4.11
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"scipy >= 1.8.1",
"h5py >= 3.7.0",
"plotly>=4.0.0",
"xgboost >= 1.3.3",
"xgboost >= 1.6.0",
"pvlib >= 0.11.0, <0.12.0",
"scikit-learn >= 1.1.3",
"arch >= 4.11",
Expand Down

0 comments on commit a46b348

Please sign in to comment.