Conversation
Documentation, which the original package largely lacked: roughly twenty of
its help topics had empty `@examples` blocks and many had empty `@param` and
`@return` tags.
* `README.Rmd` with runnable `hubExamples` examples.
* `vignette("alloscore2")` explains what an allocation score is and why a shared
budget rewards getting the relative burden across targets right, then walks
through scoring hub output, choosing what shares a budget, per-target costs,
the asymmetry parameter, and the Monte Carlo path. It closes with the known
caveats: quantile output only, the `eps_K` tolerance that lets a score go
slightly negative, and the inflated oracle allocation for generous budgets.
* `vignette("zxh-newsvendor")` is the validation vignette, reproducing the
published optima of both Zhang, Xu and Hua examples and comparing objective
values rather than just allocation vectors.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub Pages serves this repository at https://reichlab.io/alloscore2/, and other reichlab packages declare that host: distfromq uses http://reichlab.io/distfromq/ in both DESCRIPTION and _pkgdown.yml. The previous value, https://reichlab.github.io/alloscore2/, resolves only by redirect. This matters beyond tidiness because pkgdown bakes its `url` into canonical link tags, Open Graph metadata and the search index, so a non-canonical value makes the published site advertise the wrong host. Uses https rather than the http that distfromq declares; the custom domain serves https with a valid certificate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
nickreich
commented
Sep 2, 2026
Vignette edits: acknowledgments for both vignettes, a tour of the
hubExamples data being scored, prose for kappa, the cdf list column,
negative scores, the shadow price, and readings of the weighting,
alpha and per-target-component results.
README gains a Getting started section pointing at
vignette("alloscore2"), carrying both the console form and the pkgdown
URL so the link works on GitHub too. README.md re-rendered.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The old sentence applied the weighted cost formula to all six rows, but it holds only for the three with location 48 priced at 5. Say what each group of rows actually spends. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Retitle the development NEWS section as the 0.1.0 release, and lift the four entries that were not bug fixes — the ported plotting functions, the hubverse layer, the README and vignettes, and the equivalence result — out of the bug-fix section they had collected in. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Member
Author
|
I walked through the vignettes and it all looks good to me. |
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.
The last of the port: a README with runnable examples and two vignettes.
The original package documented itself thinly — roughly twenty of its help
topics had empty
@examplesblocks, and many had empty@paramand@returntags. Its two vignettes were the real specification, and both depended on
library(tidyverse)to work at all.Contents
README.Rmdwith livehubExamplesexamples: scoring hub model output,per-target detail, allocating without scoring, and the core API for use outside
the hubverse.
README.mdis generated from it and reproduces byte for byte on afresh render.
vignette("alloscore2")— the overview. It starts with why an allocationscore differs from a per-forecast score: because the budget is shared, a model
is rewarded for getting the relative burden across targets right, and can be
well calibrated at every location individually while still allocating badly.
Then: scoring hub output, choosing what shares a budget, per-target costs, the
asymmetry parameter
alpha, inspecting the lambda search, score decomposition,and the Monte Carlo path.
It closes with the caveats a user needs, rather than leaving them to be
discovered:
quantileoutput type is supported;samplescoring, which wouldlet the allocation respect dependence across targets rather than working from
marginals, is not implemented
eps_K(1% by default), so anallocation may overspend slightly and a score can come out marginally
negative (Allocation score can be negative because eps_K lets the forecaster overspend the budget #1)
oracle_allocate()spends the whole budget even when the oracle has no usefor it, so the reported oracle allocation is inflated for generous budgets,
though the score is unaffected (oracle_allocate() spends the whole budget even when the oracle has no use for it #4)
vignette("zxh-newsvendor")— the validation vignette. Reproduces thepublished optima of both Zhang, Xu and Hua (2009) examples, including the
bounded-support beta case, and compares objective values rather than just
allocation vectors, since the problem can have near-flat optima.
Verified locally
R CMD check: Status: OK, including "re-building of vignette outputs".456 tests, 0 failures, 0 warnings, 0 skips.
lintr: 0 lints.air format . --check: clean.Rebased onto
mainafter #15, so no workflow files appear in the diff.