Convert vignette examples to standalone instructional scripts#129
Merged
Conversation
Repair the failures in the full R vignette port suite: - 01_overview: replace the thin delegate shim with a full nine-section instructional port of NNSvignette_01_Overview.Rmd, including figures for the partial-moment decomposition, mode estimation, copula surfaces, nonlinear regression, ARMA forecasting, and Monte Carlo replicates. - 04_normalization: pass a list instead of a generator to np.column_stack, which numpy rejects at runtime. - 05_sampling: replace the assertion-style smoke script with a full section-by-section port of NNSvignette_05_Sampling.Rmd with CDF, inverse-CDF, Monte Carlo, and dependence-transfer figures. - 06_comparing_distributions: replace the smoke script with a full port of NNSvignette_06_Comparing_Distributions.Rmd, reconstructing the R ANOVA plot side effects from the returned statistics and adding superiority, dominance, and SD-cluster figures. - 07_clustering_and_regression: restore the file body that was committed truncated after its module docstring, porting every R section including partition orders, X-only partitioning, multivariate regression over the full grid, dimension reduction, stacking, smoothing, and imputation. - 08_classification and _vignette_support: stop rounding non-numeric arrays in the compact result renderer, and display rhs.partitions now that the multivariate result exposes it (correcting the stale gap note). - PARITY.md: update the 07/08 ledger entries to match the ports. - Lint compliance for ruff check across the examples tree, with a scoped E402 ignore for the sys.path bootstrap in instructional scripts, and ignore the generated figure output directory. All nine canonical scripts pass tests/docs/test_vignette_examples.py in fast mode and run clean in full mode; ruff and mypy pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014q6V4fJ7zz6KLAgu3ddhDp
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.
Summary
Transforms the nine canonical NNS vignette examples from thin wrapper scripts into comprehensive, self-contained instructional Python scripts that faithfully reproduce the R vignette curriculum. Each script now includes the complete statistical narrative, demonstrations, and figure generation.
Key Changes
Vignette Scripts (01–09): Converted from single-line imports to full implementations with:
examples/vignettes/output/Support Infrastructure (
examples/_vignette_support.py):show,table,section, etc.)Data Files:
examples/data/iris.csv,mtcars.csv,AirPassengers.csvDocumentation:
PARITY.md: Ledger of R-to-Python vignette correspondence and known API gapsREADME.mdandmanifest.ymlto reflect new structuresitecustomize.py: Enables vignettes to import shared support directlyTesting:
test_vignette_examples.pyto run canonical scripts with fast-mode supporttest_canonical_vignette_manifest.pyto verify data file presenceConfiguration:
.gitignoreto exclude generated output directorypyproject.tomlto allow vignette scripts to modifysys.pathImplementation Details
rgl3D plots with static equivalentshttps://claude.ai/code/session_014q6V4fJ7zz6KLAgu3ddhDp