Repository navigation
1046: Add multivariate forecasts section to scoring rules vignette - #1250
Draft
nikosbosse wants to merge 4 commits into
Draft
nikosbosse wants to merge 4 commits into
nikosbosse wants to merge 4 commits into
Conversation
Describe the energy score and the variogram score (including its use for multivariate point forecasts), with formulas, references and a pointer to the multivariate scoring vignette. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clarify why the variogram score detects misspecified correlations, state that it is proper but not strictly proper, describe the default weights precisely, mention forecast horizons as an example, point to get_metrics(example_multivariate_sample), and cite Gneiting & Raftery (2007) for the energy score. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge the duplicated default-metrics sentence, reword the description of joint_across, note that quantile forecasts cannot be scored with the multivariate scores, qualify strict propriety of the energy score, and brace-protect capitals in the new bib entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1250 +/- ##
=======================================
Coverage 99.18% 99.18%
=======================================
Files 41 41
Lines 2333 2333
=======================================
Hits 2314 2314
Misses 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
CLAUDE:
Description
This PR closes #1046.
The "Scoring rules" vignette now has a short Multivariate forecasts section, as asked for in the issue ("give a nod to multivariate forecasts"). The section:
as_forecast_multivariate_sample(),as_forecast_multivariate_point()) and explains thatjoint_acrossnames the column(s) across which forecasts are pooled into a single multivariate forecast; states the default metrics (pointing toget_metrics(example_multivariate_sample)), notes that quantile-based forecasts cannot be scored with these multivariate scores, and links tovignette("scoring-multivariate-forecasts");p = 0.5, all weights equal to one), how point forecasts are handled, the underlyingscoringRulesfunctions, and the main strengths and weaknesses of each score. The energy score is strictly proper (relative to distributions with finite first moment) but discriminates poorly on dependence structure. The variogram score is proper but not strictly proper, because it is insensitive to a common shift.Two bib entries are added to
vignettes/scoring-rules/scoringutils-package.bib: Gneiting, Stanberry, Grimit, Held & Johnson (2008), TEST 17(2):211-235, doi:10.1007/s11749-008-0114-x, and Scheuerer & Hamill (2015), Monthly Weather Review 143(4):1321-1334, doi:10.1175/MWR-D-14-00269.1. Both were checked against their DOIs and against the@referencesalready inR/metrics-multivariate-sample.R. Capitalised words in the titles are brace-protected in the same style as the existing Zotero exports. Gneiting & Raftery (2007) is also cited, and that entry was already in the bib.I checked the factual claims against the code.
get_metrics()returnsenergy_scoreandvariogram_scorefor multivariate sample forecasts and onlyvariogram_scorefor multivariate point forecasts. The defaultsp = 0.5andw_vs = NULL(all weights equal to one inscoringRules::vs_sample()) matchR/metrics-multivariate-sample.RandR/metrics-multivariate-point.R. I re-rendered the vignette withdevtools::load_all()+rmarkdown::render(), and all citations resolve (no???).Implementation: two independent drafts were compared by a judge agent; draft A was chosen as base. A few wording improvements from draft B were grafted in.
Review
An independent adversarial agent reviewed the PR (verdict: approve). Changes made in response:
@references.TESTjournal name, matching the Zotero-export style of the other entries (so sentence-case CSL styles would not lowercase them).get_metrics(example_multivariate_sample).joint_acrossto say it names the column(s) across which forecasts are pooled.Rebutted: nothing. The optional suggestion to re-export the entries from Zotero (adding abstract/file fields) was not done; the brace protection covers the formatting concern, and the extra Zotero fields are not used in rendering.
Checklist
devtools::test()passes with 0 failures.)I have added or updated unit tests where necessary.N/A: docs-only change (vignette, bib, NEWS). No behaviour changes, so there is no test that could fail before and pass after.I have built the package locally and run rebuilt docs using roxygen2.N/A: no roxygen comments or R code changed. The vignette was rendered locally.My code follows the established coding standards and I have runN/A: no R files changed.lintr::lint_package()to check for style issues introduced by my changes.🤖 Generated with Claude Code