Skip to content

Expand numpyro_forecast description and fresh-retail stockout example - #209

Merged
juanitorduz merged 3 commits into
forecasting-articlefrom
forecasting-article-numpyro-forecast
Jul 16, 2026
Merged

Expand numpyro_forecast description and fresh-retail stockout example#209
juanitorduz merged 3 commits into
forecasting-articlefrom
forecasting-article-numpyro-forecast

Conversation

@juanitorduz

Copy link
Copy Markdown
Owner

Summary

Adds the requested numpyro_forecast information to the IJF paper (see #201) with minimal disruption: net +1 review-mode page (28 to 29), no structural changes, and the abstract's "six case studies" framing untouched.

  • Section 2 (one sentence): what the package actually provides: a pure functional core with an interchangeable object-oriented interface carried over from Pyro (ForecastingModel, Forecaster for SVI, HMCForecaster for NUTS), time-sliced cross-validation through rolling- and expanding-window backtesting (including the vectorized variant that fits every window in a single vmapped SVI run), and metrics such as the empirical continuous ranked probability score and empirical interval coverage.
  • Section 5.3 (two paragraphs + figure): extends the censored-demand case study with the complementary multiplicative availability-factor formulation on FreshRetailNet-50K, the full-availability counterfactual that turns the sales forecast into an uncensored demand forecast (panel uplift about 8.7% of test-window volume), and a new figure for series 22::267 from Forecasting Retail Demand Under Stockouts.
  • Scaling data point: the full 50,000-series panel runs end to end in approximately ten minutes on a single GPU via Modal, with posterior and posterior predictive draws generated in fixed-size chunks offloaded to host memory (batch_size, device="host"; [Fix] to_datatree OOMs on GPU: in-sample predictive materializes all draws in one allocation numpyro_forecast#65), so accelerator memory is bounded by one chunk.
  • Section 3.4 (one word): "new benchmarks" becomes "systematic benchmarks" so the qualitative-scaling stance composes with the new wall-clock data point.
  • References: adds the FreshRetailNet-50K dataset paper (Wang et al., 2025, arXiv:2505.16319) and the worked-example blog post. Both verified live.

Rebuilt ijof.pdf included; build is clean (no undefined references, no overfull boxes).

🤖 Generated with Claude Code

juanitorduz and others added 3 commits July 16, 2026 21:05
- Section 2: describe numpyro_forecast's functional and object-oriented APIs, rolling/expanding-window backtesting (time-sliced cross-validation, including the vectorized vmap variant), and metrics such as the continuous ranked probability score and empirical interval coverage.
- Section 5.3: extend the censored-demand case study with the multiplicative availability-factor approach on FreshRetailNet-50K, the full-availability counterfactual, and a new figure (series 22::267).
- Report the 50K-series scaling data point (approximately ten minutes on a single GPU via Modal) and the chunked host-offload posterior predictive sampling.
- Section 3.4: change "new benchmarks" to "systematic benchmarks" for consistency with the new wall-clock data point.
- Add references: FreshRetailNet-50K dataset paper (Wang et al., 2025) and the "Forecasting Retail Demand Under Stockouts" worked example.

Co-Authored-By: Claude Fable 5 <[email protected]>
Correctness: numpyro.set_platform("cuda") (the "gpu" string is invalid in NumPyro 0.21), accurate handlers.mask description (likelihood masking, not AR-state freezing), accurate optimizer claims (numpyro.optim exists; Optax accepted directly), obermeyer2022pyro cited for epidemiological (not compartmental) models, export-path argument names (predictive_batch_size/predictive_device), Listing 2 caption notes elided conditioning and horizon guards.

Bibliography: riutort2022practical is a 2023 Statistics and Computing journal article (was 2022 @inproceedings), gorinova2019automatic is ICML 2020 pp. 3648-3657 (was 2019 with wrong pages), six @software entries converted to @misc with howpublished URLs (silences all bibtex warnings).

Style: Acknowledgments (American spelling), abstract trimmed 159 to 149 words per the IJF 100-150 limit (also drops code notation), time-series cross-validation naming aligned, pre-trained/dataset hyphenation unified, small grammar fixes, SVI/NUTS acronyms replaced with full terms at first package mention.

Layout: float parameter tuning and top-aligned float pages, both code listings are now unbreakable floats (fixes Listing 2 splitting across pages), weak [h] figure placements normalized to [!htbp], availability figure slightly reduced so text flows beneath it. No more lone vertically centered figure pages; build is clean (0 undefined refs, 0 overfull boxes, 0 bibtex warnings); still 29 review-mode pages.

Co-Authored-By: Claude Fable 5 <[email protected]>
Captures the special-section logistics (dates, article type, cover letter, guest editors), the double-anonymization work the IJF guide requires before submission, the declarations to prepare, and referee-risk notes from the call's evaluation criteria.

Co-Authored-By: Claude Fable 5 <[email protected]>
@juanitorduz

Copy link
Copy Markdown
Owner Author

Review pass (correctness, consistency, journal fit, layout)

Ran a detailed review of the paper against the installed NumPyro 0.21, the numpyro_forecast source, the cited notebooks, the IJF call for papers, and the guide for authors, plus a page-by-page layout inspection. Two commits: 025372a (fixes) and 05ffa12 (submission checklist).

Fixed (correctness)

  • numpyro.set_platform("gpu") is not a valid platform string in NumPyro 0.21 (valid: cpu, cuda, rocm, tpu, METAL); now "cuda".
  • The censored-demand section said handlers.mask stops the AR state from updating during stockouts; the mask actually drops those steps from the likelihood while the recursion continues (verified against the demand notebook). Reworded.
  • "NumPyro does not maintain its own optimizer library" was inaccurate (numpyro.optim ships Adam, ClippedAdam, and others); now says it ships thin wrappers and accepts any Optax optimizer directly.
  • obermeyer2022pyro (the PyR0 Science paper) does not describe compartmental models; the sentence now says "epidemiological models at scale".
  • Export-path argument names corrected (predictive_batch_size/predictive_device on to_datatree, vs batch_size/device on prediction).
  • Listing 2 caption now notes that conditioning on observed counts and the horizon guards are elided (the printed snippet is otherwise not runnable as-is).

Fixed (bibliography)

  • riutort2022practical: was a 2022 @inproceedings with booktitle={Statistics and Computing}; it is a 2023 Statistics and Computing journal article (33:17, DOI added).
  • gorinova2019automatic: was year 2019 with pages 2357-2366; the paper is ICML 2020, pp. 3648-3657.
  • Six @software entries converted to @misc (the model5-names style does not define @software); all bibtex warnings are now zero.

Fixed (style and journal fit)

  • Abstract trimmed 159 -> 149 words (IJF limit is 100-150) by dropping the scan/plate parenthetical (the guide also discourages notation in abstracts) and "publicly available".
  • Acknowledgments (American spelling), time-series cross-validation naming unified, pre-trained/dataset hyphenation unified, a few small grammar fixes.

Fixed (layout)

  • Listing 2 no longer splits across two pages (both listings are now unbreakable floats).
  • No more pages holding a single vertically centered figure with large whitespace: float parameters tuned, float pages top-aligned, the availability figure slightly reduced so text flows beneath it. Build is clean (0 undefined references, 0 overfull boxes); still 29 review-mode pages.

Deliberately not changed (see submission_checklist.md)

  • Double-anonymization: IJF review is double-blind (the template comments out the author block; self-citations should be anonymized). The current draft has authors inline and 25 self-citation occurrences; deferred to submission time, with a suggestion to ask the guest editors how to handle survey-of-own-work papers.
  • Declarations (competing interest, CRediT, funding, data availability, generative-AI), cover letter, coauthor emails (two TODOs remain), optional highlights.
  • Referee-risk notes: the call lists benchmarking as a topic and the paper deliberately declines systematic benchmarks; Python/JAX-only scope vs the call's R/Python/Julia framing; software-maturity evidence.

🤖 Generated with Claude Code

@juanitorduz
juanitorduz merged commit 89c2324 into forecasting-article Jul 16, 2026
1 check passed
@juanitorduz
juanitorduz deleted the forecasting-article-numpyro-forecast branch July 16, 2026 20:02
juanitorduz added a commit that referenced this pull request Aug 4, 2026
… – Open‑Source Edition] (#202)

* init

init2

revision

initl ijof

labs address

rm legacy

rm

* feedback1 init (#204)

* IJF paper improvements: trim, cuthbert, referee-proofing (#205)

* IJF paper improvements: trim, cuthbert, referee-proofing

Tighten the manuscript toward the ~20-page special-section brief (23 pages
including references), add cuthbert and scan-vs-Kalman flexibility in the
ecosystem section, and address IJF-audience referee points: reconciliation
terminology, proper scoring rules, vmap backtesting, related-substrate
positioning, and softened TSB claim. Rebuild PDF with verified figures.

Co-authored-by: Cursor <[email protected]>

* Revise availability-TSB and censored-demand case studies

Add modified TSB equations and scan-flexibility argument to Section 4.2.
Rewrite Section 4.3 around the demand blog: remove mismatched
censoring_12_0.png, expand censored-likelihood narrative, and focus
Figure 3 on demand_25_0.png with an accurate caption. Add amsmath for
equation blocks and cross-links from Section 3 and the community layer.

Co-authored-by: Cursor <[email protected]>

* rerun

* add code back

* improve image

---------

Co-authored-by: Cursor <[email protected]>

* Add structured-covariate section and pyrenew reference (#206)

Promote structured covariate handling to a dedicated Section (sec:covariates)
with the event_basis listing relocated from the HSGP case study, expand the
effect-handler paragraph, thread the affordance through the abstract, intro,
and conclusion, and add the pyrenew reference. Rebased onto the merged IJF
improvements from PR #205.

Co-authored-by: Cursor <[email protected]>

* references (#207)

* Address Theo's final review (PR #202 round 2) (#208)

Apply all 18 inline comments from review 4583325705: reword the
joint-draws/election passage, drop Optax from the primitives sentence,
clarify Flax's role, state the scan-vs-Kalman trade-off where scan's
ease is claimed, motivate BlackJAX/flowMC via difficult posterior
geometries, replace the stale dynamax cite with dynestyx (which
specifies SSMs as NumPyro models and calls cuthbert), hyphenate
end-to-end, set off the cross-validation aside with dashes, rename
affordance to capability throughout, use standard Normal(0,1)/
HalfNormal(1) hyperpriors in the event-basis listing, explain why
non-centered reparameterization helps NUTS, spell out TSB at first
use, reword "forking the estimator", add the auxiliary-noise-scale
weighting sentence to the calibration section, mention pretrained
models as boosting layers, and cite the Chronos-2, Toto, and TimesFM
papers instead of checkpoint/port repos.

Co-authored-by: Claude Fable 5 <[email protected]>

* Expand numpyro_forecast description and fresh-retail stockout example (#209)

* Expand numpyro_forecast description and censored-demand case study

- Section 2: describe numpyro_forecast's functional and object-oriented APIs, rolling/expanding-window backtesting (time-sliced cross-validation, including the vectorized vmap variant), and metrics such as the continuous ranked probability score and empirical interval coverage.
- Section 5.3: extend the censored-demand case study with the multiplicative availability-factor approach on FreshRetailNet-50K, the full-availability counterfactual, and a new figure (series 22::267).
- Report the 50K-series scaling data point (approximately ten minutes on a single GPU via Modal) and the chunked host-offload posterior predictive sampling.
- Section 3.4: change "new benchmarks" to "systematic benchmarks" for consistency with the new wall-clock data point.
- Add references: FreshRetailNet-50K dataset paper (Wang et al., 2025) and the "Forecasting Retail Demand Under Stockouts" worked example.

Co-Authored-By: Claude Fable 5 <[email protected]>

* Review pass: correctness, bibliography, style, and layout fixes

Correctness: numpyro.set_platform("cuda") (the "gpu" string is invalid in NumPyro 0.21), accurate handlers.mask description (likelihood masking, not AR-state freezing), accurate optimizer claims (numpyro.optim exists; Optax accepted directly), obermeyer2022pyro cited for epidemiological (not compartmental) models, export-path argument names (predictive_batch_size/predictive_device), Listing 2 caption notes elided conditioning and horizon guards.

Bibliography: riutort2022practical is a 2023 Statistics and Computing journal article (was 2022 @inproceedings), gorinova2019automatic is ICML 2020 pp. 3648-3657 (was 2019 with wrong pages), six @software entries converted to @misc with howpublished URLs (silences all bibtex warnings).

Style: Acknowledgments (American spelling), abstract trimmed 159 to 149 words per the IJF 100-150 limit (also drops code notation), time-series cross-validation naming aligned, pre-trained/dataset hyphenation unified, small grammar fixes, SVI/NUTS acronyms replaced with full terms at first package mention.

Layout: float parameter tuning and top-aligned float pages, both code listings are now unbreakable floats (fixes Listing 2 splitting across pages), weak [h] figure placements normalized to [!htbp], availability figure slightly reduced so text flows beneath it. No more lone vertically centered figure pages; build is clean (0 undefined refs, 0 overfull boxes, 0 bibtex warnings); still 29 review-mode pages.

Co-Authored-By: Claude Fable 5 <[email protected]>

* Add IJF submission checklist

Captures the special-section logistics (dates, article type, cover letter, guest editors), the double-anonymization work the IJF guide requires before submission, the declarations to prepare, and referee-risk notes from the call's evaluation criteria.

Co-Authored-By: Claude Fable 5 <[email protected]>

---------

Co-authored-by: Claude Fable 5 <[email protected]>

* corrections init (#210)

* rm email

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
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