Skip to content

Add fitting-procedure, index-set, fold-count and new-observation macros - #144

Merged
dem-extra1 merged 5 commits into
mainfrom
claude/project-thread-yntg2m
Oct 15, 2026
Merged

dem-extra1 merged 5 commits into
mainfrom
claude/project-thread-yntg2m

Conversation

@dem-extra1

@dem-extra1 dem-extra1 commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Ezra · project thread

Before: the sds model-validation chapter wrote its fitting procedure g, candidate list g_1, …, g_L, fold count k, index sets I, indices i, j, l, held-out size m, and new observation (X_0, Y_0) as plain letters, because no role macro existed (Ezra's no-plain-letters rule).

After: role-named macros for each, with interpretations.tsv rows:

  • Procedures: \fitproc (g), \candproc{l} (g_l), \candproctuned{CV} (g with a label superscript), \candfnset{l} (the set of candidate prediction functions of procedure l), \ncand (L), \icand (l).
  • Folds and indices: \nfolds (k), \ifold (j), \iobs (i), \obsidx (I), \nheld (m).
  • Terms: \termfn{j} (t_j, a term of a linear-in-terms model), \polydeg (d), \sscp (A, the cross-product matrix of the term vectors).
  • New observation, marked with a star subscript (Ezra, 2026-10-15): \newpredvar, \newoutvar (random X_, Y_), \newpredval, \newoutval (fixed x_, y_), and \heldpredvar{j}, \heldoutvar{j}, \heldpredval{j}, \heldoutval{j} for the j-th held-out observation. They build on the existing \predvar, \outvar, \Predvar, \Outvar. The star is a subscript so it stays distinct from the superscript-star macros \bestmod (h^), \nparams (p^), \modresidual (r^) and \vxs (x^).

Reused, not added: \nobs, \modmem, \trainset, \valset, \trainidx, \validx, \testidx, \tuning, \inputdim, \nparams.

How: grepped macros.qmd and interpretations.tsv for each new name first (none existed; no duplicate keys). quarto render macros-table.qmd succeeds, so every macro has an interpretation. tools/check_latex.py could not run here (no pdflatex), but none of the new \providecommand names is a LaTeX built-in. The sweep that uses these is sds#169, in the sds model-validation plain letters thread.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RrPGd384p7JxqzpbAhs9ZD

Copilot AI balanced review requested due to automatic review settings October 15, 2026 01:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@dem-extra1 dem-extra1 self-assigned this Oct 15, 2026
Copilot AI balanced review requested due to automatic review settings October 15, 2026 01:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copy link
Copy Markdown
Collaborator Author

/review


Generated by Claude Code

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Collaborator Author

Optional wording nit on \sscp: stays as is for now so the clean verdict on this head holds; the fix rides this PR's next code push if one comes.


Posted by Claude Code (AI agent) --- not written by a human.


Generated by Claude Code

Copilot AI balanced review requested due to automatic review settings October 15, 2026 01:51

Copy link
Copy Markdown
Collaborator Author

/review

This is a one-line wording fix to the \sscp row in interpretations.tsv, which addresses the earlier non-blocking style nit.


Generated by Claude Code

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

This comment has been minimized.

Copilot AI balanced review requested due to automatic review settings October 15, 2026 01:53

Copy link
Copy Markdown
Collaborator Author

/review

Ezra asked for a star subscript instead of 0 on new and held-out observations (\newpredvar and its siblings now print X_*, Y_*, X_{*,j} and so on). The star is a subscript, so it stays distinct from the superscript-star macros \bestmod (h^), \nparams (p^), \modresidual (r^) and \vxs (x^).


Posted by Claude Code (AI agent), not written by a human.
Generated by Claude Code


Generated by Claude Code

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copilot AI balanced review requested due to automatic review settings October 15, 2026 02:07

Copy link
Copy Markdown
Collaborator Author

/review

I merged main (which now carries macros#132) into this branch right before merging. The merge was clean, there are no duplicate keys in interpretations.tsv, and macros-table.qmd renders.


Posted by Claude Code (AI agent), not written by a human.
Generated by Claude Code


Generated by Claude Code

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

👀 Claude Review Dispatched — run reviewing PR #144 at 14e4b06.

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.

2026-10-15 02:13 UTC

@github-actions

Copy link
Copy Markdown
Contributor

Claude finished review — View run


All 5 checks now pass. The diff content is unchanged from the previously reviewed head (1f4fb635) — the only change in this round is a merge commit that advanced the PR's base to include an unrelated main-branch commit (#132, adding \estf-type macros), with the merge-base now landing exactly on that commit and zero net diff introduced by it.

Review of #144 (round 3)

What changed since the last round: git diff 1f4fb635..14e4b069 touches interpretations.tsv/macros.qmd by +6/+6 lines, but that's main's commit 96c03d8 (macros for the estimated target function, #132) arriving via the "Merge main into the macros branch" merge commit — not new content from this PR. Confirmed by computing git diff $(git merge-base HEAD origin/main) HEAD: the merge-base is now 96c03d8 itself, and the base...head diff is still exactly the same 22+22 lines as rounds 1–2 (interpretations.tsv +22, macros.qmd +22, 44 total, matching gh pr view's additions:44/changedFiles:2). No new macro content was introduced in this round.

Verification performed

  • Re-ran the duplicate-key check on the post-merge interpretations.tsv (1327 lines) — no duplicates (cut -f1 | sort | uniq -d empty), and no field-count anomalies.
  • Confirmed none of the 20 PR macros collide with the 6 macros #132 brought in from main (no shared names; #132's macros concern the estimated target function and sit at the file's prior tail before this PR's block).
  • Confirmed \fitproc still has exactly the expected 3 occurrences in macros.qmd (its own \def plus the two reuses in \candproc/\candproctuned), unchanged from round 1's finding.
  • gh pr checks 144: all 5 checks pass (Analyze (actions), Analyze (python), CodeQL, build, check) — build was briefly pending mid-run but completed green on recheck.
  • Confirmed via live gh pr view (state: OPEN, mergedAt: null, closed: false) that the PR is open and unmerged, consistent with the authoritative status given. The latest human comment ("I merged main... into this branch right before merging") refers to merging main into the PR branch, not merging the PR itself — not evidence of a merge.
  • No new findings beyond the round-1 wording nit on \sscp, which was already fixed in round 2 (confirmed present as "sum-of-squares-and-cross-products matrix of the term vectors, A" with no redundant parenthetical) and reconfirmed unchanged here.

Findings

None. This round introduces no new PR content — only a routine merge of main into the branch — and all prior findings are either resolved (the \sscp wording) or remain non-issues.

The prior verdict from round 2 (comment, posted 2026-10-15T02:00:54Z) — "Diff is clean from this review; CI is green" — still stands: the diff is unchanged and CI is now fully green (5/5, including the previously-pending build check).

Verdict

Ready for merge — no new findings; diff unchanged from the already-clean round 2 state, and CI is green 5/5.

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "14e4b0699eab9eaabe4e5e993bd88a94cceb6aa4",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "Diffed merge-base(HEAD,origin/main)..HEAD across interpretations.tsv and macros.qmd; the merge commit only advances the base to include main's unrelated commit 96c03d8, introducing zero net lines beyond the already-reviewed 22+22 macro additions.",
  "holistic_assessment": "Confirmed no naming collisions between this PR's 20 new macros and the 6 macros merged in from main's commit 96c03d8, no duplicate interpretations.tsv keys, and all 5 CI checks (Analyze actions/python, CodeQL, build, check) pass on the current head."
}

Reviewed commit: 14e4b06

@github-actions

Copy link
Copy Markdown
Contributor

💰 Cost: $0.2698 (review) — run

@dem-extra1
dem-extra1 merged commit 18f48cb into main Oct 15, 2026
12 checks passed
@dem-extra1
dem-extra1 deleted the claude/project-thread-yntg2m branch October 15, 2026 02:12
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.

3 participants