Skip to content

Replace thin examples with full instructional R vignette ports#124

Closed
OVVO-Financial wants to merge 17 commits into
mainfrom
agent/full-r-vignette-ports
Closed

Replace thin examples with full instructional R vignette ports#124
OVVO-Financial wants to merge 17 commits into
mainfrom
agent/full-r-vignette-ports

Conversation

@OVVO-Financial

Copy link
Copy Markdown
Owner

Purpose

Replace the abbreviated numbered Python examples with section-by-section instructional ports of the canonical R NNS vignettes.

Acceptance standard

  • Preserve the R vignette section order and statistical narrative.
  • Reproduce every executable demonstration supported by Python.
  • Use the same datasets or committed faithful equivalents.
  • Generate equivalent figures rather than substituting console summaries.
  • Display important returned structures and numerical results.
  • Explicitly identify genuine R/Python API gaps where they occur.
  • Treat each numbered Python file as an instructional vignette, not a test script.

What changed

  • Rewrote all nine numbered Python files as Jupytext-style instructional scripts.
  • Added exact local copies of R's iris, mtcars, and AirPassengers datasets.
  • Added shared figure/output and result-rendering support.
  • Added PARITY.md, a per-vignette section and API-gap ledger.
  • Expanded manifest.yml into a machine-readable acceptance contract.
  • Updated documentation to distinguish canonical instructional vignettes from focused unnumbered examples.
  • Updated CI tests to execute all nine canonical scripts in fast mode and require generated figures.

Runtime behavior

Normal execution runs the full R-equivalent parameter grids and repetitions. NNS_VIGNETTE_FAST=1 reduces expensive repetitions and candidate grids for CI without removing sections or changing the instructional sequence.

Known explicit gaps

The scripts identify gaps at the relevant sections, including R Voronoi rendering, rhs.partitions, interactive rgl views, separate seasonal.plot output, and stochastic bit-for-bit RNG differences. No missing API is silently replaced with an unrelated demonstration.

Validation

Draft until the Python 3.11–3.14 matrix, figure-generation checks, linting, typing, and distribution builds pass.

OVVO-Financial and others added 17 commits July 16, 2026 00:32
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

Copy link
Copy Markdown
Owner Author

Superseded by #129, which carries this branch's full vignette ports plus the fixes that took CI green (identical head commit). Closing to avoid a duplicate merge.


Generated by Claude Code

@OVVO-Financial
OVVO-Financial deleted the agent/full-r-vignette-ports branch July 16, 2026 21:00
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