Repository navigation
1125: Test w and w_vs arguments of the variogram score - #1245
Open
nikosbosse wants to merge 4 commits into
Open
nikosbosse wants to merge 4 commits into
nikosbosse wants to merge 4 commits into
Conversation
Compare variogram_score_multivariate() with w, w_vs and both against scoringRules::vs_sample(), and variogram_score_multivariate_point() with w_vs, and check that the weighted scores differ from the unweighted ones so a dropped argument is caught. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reuses the setup of the existing 'matches scoringRules::vs_sample()' test instead of duplicating it in a separate test block. 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 #1245 +/- ##
=======================================
Coverage 99.18% 99.18%
=======================================
Files 41 41
Lines 2331 2331
=======================================
Hits 2312 2312
Misses 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
LGTM. @sbfnk, any objections? |
nikosbosse
marked this pull request as ready for review
November 8, 2026 13:39
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 #1125.
The
wandw_vsarguments of the variogram score were not exercised by any test (raised in review of #1114). This PR adds tests only; no code inR/changes.tests/testthat/test-class-forecast-multivariate-sample.R: the existing testvariogram_score_multivariate() matches scoringRules::vs_sample()(which already checkspthis way) is extended to callvariogram_score_multivariate()withwalone,w_vsalone, and both together. Each result is compared per group againstscoringRules::vs_sample()with the same weights, and the single-weight results are checked to differ from the unweighted score.tests/testthat/test-class-forecast-multivariate-point.R: new test callingvariogram_score_multivariate_point()withw_vs, compared againstscoringRules::vs_sample()per group and checked to differ from the unweighted score. (The point version has nowargument; it always usesw = NULL.)NEWS.md: bullet under a new## Internal changesheading in the development section.Mutation check: replacing
w/w_vswithNULLin thevs_sample()call inR/metrics-multivariate-sample.Randw_vswithNULLinR/metrics-multivariate-point.Rmakes the multivariate test files fail (FAIL 7); with the real code they pass. Re-run after the review changes, same result.Implementation: two independent drafts were compared by a judge agent; draft A was chosen as base.
Review
An independent adversarial agent reviewed the PR (verdict: approve, including its own mutation check that reproduced the 7 failures).
Changed in response:
matches scoringRules::vs_sample()test line for line. They are now folded into that test as extra expectations, reusing its data and unweighted score (diff shrank from 57 to 43 added lines in that file).Kept / rebutted:
w+w_vscase (reviewer called it redundant but harmless): kept as a cheap check that passing both at once is forwarded correctly, which the single-argument cases do not rule out by themselves.Checklist
[ FAIL 0 | WARN 4 | SKIP 0 | PASS 1049 ].lintr::lint_package()to check for style issues introduced by my changes.lintr::lint()on both changed test files: no lints.🤖 Generated with Claude Code