Skip to content

Wind speed as a distribution: QQ quantiles, hybrid Weibull, exceedance, bootstrap over runs - #10

Merged
scorvec merged 2 commits into
mainfrom
claude/wind-distribution
Oct 19, 2026
Merged

scorvec merged 2 commits into
mainfrom
claude/wind-distribution

Conversation

@scorvec

@scorvec scorvec commented Oct 19, 2026

Copy link
Copy Markdown
Owner

RMSE and bias reward a forecast that hedges towards the middle; wind speed is skewed and bounded at zero, so distribution.compare(pairs, "ws10") compares it as a distribution, on the common sample, by region and lead group (days 1–2, 3–5, 6–10):

  • forecast and observed quantiles at 1–99.5 % (a QQ plot);
  • the hybrid Weibull (Takle & Brown 1978): the calm fraction (< 0.5 m/s) and a maximum-likelihood shape k and scale c for the rest (Newton on the profile likelihood; it matches scipy.stats.weibull_min.fit on the same values);
  • exceedance of 5, 10 and 15 m/s.

A bootstrap over whole runs, model and observation paired, gives 95 % intervals for each model-minus-observed quantile, k, c and the exceedance ratio. Values are binned at 0.05 m/s per run, so a resample is a sum of histograms.

Tests: the fit against SciPy, binned quantiles against exact ones, and a synthetic comparison. A model a fifth too slow is flagged in its 90th percentile, its scale and its 10 m/s frequency; an independent draw from the observed distribution is not. Plus the minimum-runs rule.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XNh8pbXM7FCZppdye7QTLx

scorvec and others added 2 commits October 19, 2026 08:07
distribution.compare: on the common sample, by region and lead group, forecast and
observed quantiles at 1-99.5 % (QQ), the hybrid Weibull (calm fraction and a
maximum-likelihood k and c for the rest; Takle and Brown 1978) and exceedance of
5/10/15 m/s, with a bootstrap over whole runs (model and observation paired) for
each model-minus-observed quantile, k, c and exceedance ratio. Values are binned
at 0.05 m/s per run, so a resample is a sum of histograms.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XNh8pbXM7FCZppdye7QTLx
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XNh8pbXM7FCZppdye7QTLx
@scorvec
scorvec merged commit f1e6df9 into main Oct 19, 2026
6 checks passed
@scorvec
scorvec deleted the claude/wind-distribution branch October 19, 2026 12:12
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