Skip to content

Add Python vignettes for NNS R 13.0 curriculum - #4

Merged
OVVO-Financial merged 2 commits into
mainfrom
python-vignettes-r13
Jun 13, 2026
Merged

Add Python vignettes for NNS R 13.0 curriculum#4
OVVO-Financial merged 2 commits into
mainfrom
python-vignettes-r13

Conversation

@OVVO-Financial

Copy link
Copy Markdown
Owner

This PR recreates the NNS vignette curriculum as Python-native documentation and executable examples.

The examples are based on the combined NNS vignette PDF and vendored R vignette sources, but are written against the public Python nns API. They assume the fresh R NNS 13.0 parity corrections from PR #3.

Validation:

  • every example script runs
  • docs example test passes
  • R 13.0 smoke test passes
  • invariants pass
  • ruff, mypy, and build pass

Structure

docs/vignettes/         README + 00_overview .. 09_portfolio_stochastic_dominance
examples/vignettes/     one runnable script per vignette
tests/docs/             test_vignette_examples.py (runs each script, fails on nonzero exit)

Notes

  • Translated from the vendored R vignette sources (tools/NNS/vignettes, tools/NNS/inst/doc), not OCR-copied; the ideas and examples are expressed idiomatically in Python.
  • Deterministic where possible: seeded RNG, small data sizes for fast docs tests, numeric/parity-stable examples preferred over plotting.
  • Stochastic routines (nns_meboot, nns_mc, the nns_ss CI, the nns_anova robust interval) are validated by structure and range, never by exact resampled values.
  • The numeric ARMA, stack, and boost examples reuse the deterministic designs verified against live R NNS 13.0 in PR Fresh R NNS 13.0 parity regeneration and corrective Python fixes #3 (e.g. nonseasonal nonlinear ARMA [128.5, 113.5, 155.5, 213.6667]; stack reg/dim.red/stack; boost results/feature.weights/feature.frequency).
  • No package runtime behavior was changed in this PR. Where a vignette idea touched an API surface, the examples were written to the real return shapes (verified against the installed package), not rewritten to hide gaps.
  • No generated images or local artifacts are committed.

https://claude.ai/code/session_015pEPxpJWbiHizgcFEm1AWf


Generated by Claude Code

claude added 2 commits June 13, 2026 03:04
Recreate the R NNS vignette curriculum as Python-native documentation and
executable examples, written against the public nns API. Translated from the
vendored R vignette sources under tools/NNS/vignettes and tools/NNS/inst/doc.

- docs/vignettes/: README + 10 topic explainers (00 overview through 09
  portfolio stochastic dominance), each pairing a concept summary with public
  nns API usage.
- examples/vignettes/: 10 runnable scripts, deterministic where possible
  (seeded RNG, small data, no plotting in the default path). Bootstrap/MC and
  CI outputs are validated by structure/range, not exact values. The numeric
  ARMA/stack/boost examples use the deterministic designs verified against
  live R NNS 13.0 in PR #3.
- tests/docs/test_vignette_examples.py: runs every example script and fails
  on a nonzero exit.

Validation: docs example test, R 13.0 smoke, invariants, ruff, mypy, and
build all pass. No runtime package behavior was changed.

https://claude.ai/code/session_015pEPxpJWbiHizgcFEm1AWf
Add the docs vignette example test to the CI workflow, after the cache-only
parity step and before ruff, so every example script is exercised on each PR.

https://claude.ai/code/session_015pEPxpJWbiHizgcFEm1AWf
@OVVO-Financial
OVVO-Financial merged commit 2b9edbf into main Jun 13, 2026
4 checks passed
@OVVO-Financial
OVVO-Financial deleted the python-vignettes-r13 branch June 13, 2026 03:24
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.

2 participants