Skip to content

Improve variogram docs, deduplicate point implementation, and update vignette#1132

Merged
nikosbosse merged 8 commits intomainfrom
improve-variogram-docs
Mar 8, 2026
Merged

Improve variogram docs, deduplicate point implementation, and update vignette#1132
nikosbosse merged 8 commits intomainfrom
improve-variogram-docs

Conversation

@seabbs-bot
Copy link
Collaborator

@seabbs-bot seabbs-bot commented Mar 5, 2026

Summary

Code deduplication (#1118)

  • variogram_score_multivariate_point() now delegates to variogram_score_multivariate() with w = NULL instead of reimplementing the same vapply loop

Documentation improvements (#1124)

  • Roxygen docs consolidated using @inheritParams and @inherit across sample and point variogram functions
  • Parameter docs improved for w (fixed datpredicted reference from scoringRules), w_vs (explains pairwise weighting between targets), and p (explains how it scales differences)
  • Variogram score description now explains in concrete terms what the score measures (pairwise differences between targets, correlation sensitivity)
  • energy_score_multivariate() now has a proper description, @return, @references, and @keywords metric (was internal_input_check)

Vignette update (#1116)

  • Added variogram score coverage alongside energy score with explanation of what each measures
  • Added section on multivariate point forecasts using as_forecast_multivariate_point()
  • Shows parameter customisation via purrr::partial() (e.g. p = 1)
  • Removed the matrix-based scoringRules comparison section (implementation detail not useful to users)

Test plan

  • All 65 multivariate tests pass
  • Vignette builds without errors
  • Review rendered docs and vignette output

Closes #1118, closes #1124, closes #1116

This was opened by a bot. Please ping @seabbs for any questions.

- Have variogram_score_multivariate_point() delegate to
  variogram_score_multivariate() with w = NULL instead of
  reimplementing the same loop
- Use @inheritParams and @inherit to consolidate roxygen docs
  across the sample and point variogram functions
- Improve parameter docs for w (fix dat -> predicted reference),
  w_vs (explain pairwise weighting), and p
- Add proper descriptions, @return, and @references to
  energy_score_multivariate()
- Fix energy score keyword from internal_input_check to metric

Closes #1118, closes #1124

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@seabbs-bot seabbs-bot requested a review from seabbs March 5, 2026 11:02
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.94%. Comparing base (e6e6bda) to head (cddb3a7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1132      +/-   ##
==========================================
- Coverage   97.95%   97.94%   -0.01%     
==========================================
  Files          37       37              
  Lines        1955     1951       -4     
==========================================
- Hits         1915     1911       -4     
  Misses         40       40              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Add section on variogram score alongside energy score with
  explanation of what each measures
- Show how to customise variogram parameters via purrr::partial()
- Add multivariate point forecast section using
  as_forecast_multivariate_point()
- Add variogram score examples to the matrix-based section,
  including weight matrix (w_vs) and order parameter (p)

Closes #1116

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

seabbs-bot and others added 5 commits March 5, 2026 11:30
- Explain what the variogram score measures in concrete terms
  (pairwise differences between targets, not abstract dimensions)
- Improve p parameter docs to explain how it scales differences
- Use "targets" instead of "dimensions" throughout for clarity
- Add note on p parameter and link to docs in vignette

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Explain what the score measures in concrete terms (pairwise
  differences between targets, not abstract dimensions)
- Improve p parameter docs to explain how it scales differences
- Use "targets" instead of "dimensions" throughout for clarity

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The section compared scoringutils wrappers against raw
scoringRules calls, which is an implementation detail that
doesn't help users. The vignette now focuses on the
scoringutils API via score().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@seabbs-bot seabbs-bot changed the title Improve variogram docs and deduplicate point implementation Improve variogram docs, deduplicate point implementation, and update vignette Mar 5, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note I got rid of the matrix tests in the vignette vs scoringRules as we don't have it for other forecast types and it didn't seem like it was adding much

@seabbs seabbs linked an issue Mar 5, 2026 that may be closed by this pull request
@seabbs
Copy link
Contributor

seabbs commented Mar 5, 2026

@sbfnk I think that this does fix #1134 - the issue is that the original energy score implementation inherited from scoringRules without accounting for dat having been renamed.

Copy link
Collaborator

@nikosbosse nikosbosse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Thanks!

@nikosbosse nikosbosse merged commit f68418d into main Mar 8, 2026
11 checks passed
@nikosbosse nikosbosse deleted the improve-variogram-docs branch March 8, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants