Skip to content

docs(book): walkthroughs for 30 aprender-core public modules (BOOK-CLOSEOUT-001 follow-up) - #1905

Merged
noahgift merged 3 commits into
mainfrom
feat/book-lib-walkthroughs-batch1
May 23, 2026
Merged

docs(book): walkthroughs for 30 aprender-core public modules (BOOK-CLOSEOUT-001 follow-up)#1905
noahgift merged 3 commits into
mainfrom
feat/book-lib-walkthroughs-batch1

Conversation

@noahgift

Copy link
Copy Markdown
Contributor

Summary

Replace 20-line lib-module stubs with full walkthroughs for 30
high-value aprender-core public modules. Each chapter now has a
module summary, key types table, two runnable usage patterns, and
see-also cross-links to related modules.

Modules covered (30):
linear_model, classification, cluster, ensemble, traits,
primitives, format, nn, optim, loss, metrics, models, autograd,
decomposition, time_series, text, audio, graph, gnn, bayesian,
tree, glm, regularization, model_selection, data, calibration,
preprocessing, serialization, interpret, online.

Where the user task referenced names that aren't top-level
modules in the actual crate (svm, naive_bayes,
neighbors, quantize, linear_regression), the
walkthrough was authored on the closest real module —
svm / naive_bayes / neighbors are documented inside
classification.md, linear_regression inside
linear_model.md, and quantize content folded into
preprocessing.md (with format-level quantization referenced
in format.md). Substitute additional modules
(preprocessing, serialization, interpret, online)
were authored so the batch lands a full 30 walkthroughs.

LOC added: ~2,068 across 30 files (averaging ~70 net new
lines per chapter, from ~20 to ~85).

Fixed default stub examples that referenced non-existent
symbols:

  • aprender::traits::{Estimator, Predictor}Estimator, Transformer, UnsupervisedEstimator
  • aprender::ensemble::RandomForestMixtureOfExperts, SoftmaxGating, MoeConfig
  • aprender::loss::{MeanSquaredError, CrossEntropy}MSELoss, MAELoss, HuberLoss, Loss
  • aprender::metrics::{accuracy, f1_score} → split between top-level r_squared/mse/mae/rmse and metrics::classification::{accuracy, f1_score, Average}
  • aprender::format::{Reader, Writer}ModelCard, AprConverter, ConvertOptions
  • aprender::autograd::{Variable, backward}Tensor, no_grad
  • aprender::decomposition::PCAICA (PCA actually lives in preprocessing)
  • aprender::text::ChatTemplateChatTemplateEngine, ChatMessage
  • aprender::audio::{load_wav, MelSpectrogram}MelConfig, MelFilterbank, validate_audio
  • aprender::graph::{dijkstra, pagerank}Graph, GraphCentrality (these are trait methods, not free functions)
  • aprender::gnn::GraphConvNetworkGCNConv, GATConv, GINConv
  • aprender::glm::{PoissonGLM, GammaGLM}GLM, Family, Link
  • aprender::regularization::{L1, L2, Dropout}Mixup, LabelSmoothing, CutMix, StochasticDepth
  • aprender::data::DataLoaderDataFrame, ColumnStats

Test plan

  • bash scripts/check_book_lib_example_block.sh — PASS (all 69 lib chapters have a rust fenced block)
  • bash scripts/check_book_lib_parity.sh — PASS (69/69 modules have chapters)
  • bash scripts/check_book_linkcheck.sh — PASS (0 broken file links)
  • mdbook build — clean (only pre-existing search-index-size warning)
  • No placeholder strings (TODO / TBD / WIP / coming soon / under construction) in any of the 30 authored files
  • Every rust fenced block in the 30 authored files uses real public symbols verified against crates/aprender-core/src/<mod>/

🤖 Generated with Claude Code

@noahgift
noahgift enabled auto-merge (squash) May 23, 2026 16:40
@noahgift
noahgift force-pushed the feat/book-lib-walkthroughs-batch1 branch from cdb14d2 to 6fb8061 Compare May 23, 2026 16:46
noahgift and others added 3 commits May 23, 2026 19:12
…cation, ::cluster, ::ensemble, ::traits, ::primitives, ::format, ::nn, ::optim, ::loss, ::metrics (Refs #1902)

Replace 20-line lib-module stubs with 60-150 line walkthroughs covering:
- Module summary (purpose, what lives here, when to reach for it)
- Key types table (3-5 most important public structs/traits/enums)
- Two realistic usage patterns per chapter
- See-also cross-links to related lib modules

All rust fenced blocks use real, compiling types from aprender-core
0.35. No placeholder text. PCU headers and ``aprender::<mod>``
mentions preserved for the FALSIFY-BOOK-LIB gates.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…composition, ::time_series, ::text, ::audio, ::graph, ::gnn, ::bayesian, ::tree, ::glm, ::regularization, ::model_selection, ::data, ::calibration, ::preprocessing, ::serialization, ::interpret, ::online (Refs #1902)

Second batch of 19 lib-module walkthroughs. Same shape as commit 1:
module summary, key types table, two runnable usage patterns,
see-also cross-links. Fixed broken default examples in stubs to
reference real public types (e.g. ChatTemplateEngine not
ChatTemplate; GCNConv not GraphConvNetwork; GLM/Family/Link not
PoissonGLM/GammaGLM; DataFrame not DataLoader). PCU headers and
``aprender::<mod>`` mentions preserved.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace literal ``[0, 1]`` range notation with prose ("between 0
and 1") to suppress the spurious "Did you forget to define a URL"
warning from mdbook-linkcheck. Hard gate
FALSIFY-BOOK-LINKCHECK-001 already passes (only counts File not
found errors), but cleaning the warning keeps the linkcheck output
clean.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@noahgift
noahgift force-pushed the feat/book-lib-walkthroughs-batch1 branch from 6fb8061 to c875afe Compare May 23, 2026 17:15
@noahgift
noahgift merged commit 49a1e98 into main May 23, 2026
16 of 17 checks passed
@noahgift
noahgift deleted the feat/book-lib-walkthroughs-batch1 branch May 23, 2026 17:36
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