Skip to content

Clipping filter: skip models with no data, state its limits - #12

Merged
JustAnotherPU merged 1 commit into
mainfrom
clip-followup
Nov 15, 2026
Merged

JustAnotherPU merged 1 commit into
mainfrom
clip-followup

Conversation

@JustAnotherPU

Copy link
Copy Markdown
Owner

Follow-up to #10, after a second review of the clipping filter.

  • A model that returns no weather (KNMI outside Europe, for example) came out of pv() as 0 and pulled down the forecast used to pick clipped hours. In the test, g fell from 0.900 to 0.883. Those hours are now NaN and skipped in the mean. The outage filter reads the same mean, so it benefits too.
  • The README said forecast error does not bias the level. That was too strong. Picking hours on the forecast is unbiased when the forecast is roughly calibrated, and biased high when the forecast is the truth plus a lot of noise. To see which case real data is closer to, I compared both ways of picking hours on our roof, which never clips (45 days, 449 daylight hours, day-ahead member mean against the measured production):
hours dropped picked on the forecast picked on the measured value
none 0.902 0.902
top 5 % 0.891 0.874
top 10 % 0.892 0.843
top 20 % 0.888 0.792
top 30 % 0.922 0.737

The forecast side stays within about 2 % of the full-sample value up to 30 % of hours dropped. The README now gives these numbers and the two limits: very noisy forecasts, and a threshold that uses start_efficiency.

  • A log line when the option is set but no day-ahead forecast came back, and n_hours is counted after the masks.

Tests: one new test (a model with no data must not change g), which fails without the fix. Full suite: 93 pass on Python 3.12 locally.

- A model that returns no weather (outside its area) came out of pv() as
  0 and pulled down the forecast used to find clipped hours (and the
  outage filter). Its hours are now NaN and left out of the mean.
- Log a line when clip_limit_kw is set but no day-ahead forecast was
  available, and count n_hours after the outage and clipping masks.
- README: replace "forecast error does not bias the level" with what was
  measured. On a roof that never clips, dropping the top 20 % of hours
  gave 0.89 against a true 0.90 when picked on the forecast, 0.79 when
  picked on the measured value. Say that a very noisy forecast still
  leaves some bias, that the threshold uses start_efficiency, and that
  the filtered hours also leave band_coverage.
@JustAnotherPU
JustAnotherPU merged commit 0c2eb0f into main Nov 15, 2026
2 checks passed
@JustAnotherPU
JustAnotherPU deleted the clip-followup branch November 15, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant