Repository navigation
Publish how often the actual falls outside the P10/P90 band - #11
Merged
Merged
Conversation
learn() now scores the published day-ahead band (table out, last issue before 21:00 the day before) against the actuals of the last 60 days, on the same ok hours as the rest of learning, and stores the result in calibration.json. run() publishes it as the band_coverage attribute on both sensors: share of daylight hours and of days below P10 and above P90, with the counts. Hours where the band is clipped flat at the AC limit are not scored. Nothing else that is published changes. Step 4 of #6.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 4 of #6. The issue stays open for step 2.
learn() scores the published day-ahead band against the actuals of the last 60 days (or
history_daysif shorter) and stores the result in calibration.json. run() publishes it as aband_coverageattribute on both sensors: the share of daylight hours and of days below P10 and above P90, plus the counts. Below 7 scored days it only gives the counts. Hours where the band is clipped flat at the AC limit are not scored. The day-ahead pick is the same as for the level factor: last issue before 21:00 the day before, at most 6 h older, ok hours only. Nothing else that is published changes.Why only step 4: the backtest is in #6. Out-of-sample ratios and true 10/90 levels did not help on our data.
Tests: 7 in tests/test_coverage.py, all failing on main. The full suite passes on Python 3.11 and 3.12, and with the #5 branch merged in, 92 pass. On a copy of our real archive it gives 24.7 % of hours below P10, 13.6 % above P90, 11.4 % of days below P10 and 6.8 % above, over 44 days.