Add Python vignettes for NNS R 13.0 curriculum - #4
Merged
Conversation
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
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.
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
nnsAPI. They assume the fresh R NNS 13.0 parity corrections from PR #3.Validation:
Structure
Notes
tools/NNS/vignettes,tools/NNS/inst/doc), not OCR-copied; the ideas and examples are expressed idiomatically in Python.nns_meboot,nns_mc, thenns_ssCI, thenns_anovarobust interval) are validated by structure and range, never by exact resampled values.[128.5, 113.5, 155.5, 213.6667]; stackreg/dim.red/stack; boostresults/feature.weights/feature.frequency).https://claude.ai/code/session_015pEPxpJWbiHizgcFEm1AWf
Generated by Claude Code