Skip to content

Bump latex-macros so the noise prints as ν - #259

Merged
d-morrison merged 5 commits into
mainfrom
claude/mu-true-mean-fn-fs0x15
Oct 16, 2026
Merged

d-morrison merged 5 commits into
mainfrom
claude/mu-true-mean-fn-fs0x15

Conversation

@d-morrison

@d-morrison d-morrison commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Ezra · project thread

Before: the latex-macros pin predates macros#175, so the noise macro printed ε.

After: the pin moves to the merge commit of macros#175, where the noise is an alias of the deviation from the population mean and prints ν (Ezra, 2026-10-16). No source file changes. The model-validation chapter keeps \mean for the mean function, which Ezra preferred in review, and \mean still prints μ.

How: submodule bump only.

🤖 Generated with Claude Code

https://claude.ai/code/session_01H8gaSFRnPKEfpCbBRqEzZH

@d-morrison d-morrison self-assigned this Oct 16, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

when, from each procedure to the next,
the squared [bias](#def-prediction-bias)
of the prediction, used as an [estimator](estimation.qmd#def-estimator) of $\mean(\predvar)$, does not rise
of the prediction, used as an [estimator](estimation.qmd#def-estimator) of $\targetfnf{\predvar}$, does not rise

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

why didn't CI automatically flag the semantic line breaks here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

check-new-line-breaks only flags an added line that packs more than one sentence (its header says so). This line is one long sentence with clauses joined by commas, so it passes. A rule against long single sentences would need a new check in gha.

Fixed in 55147f4: this line and three other lines the macro swap touched now break at clause boundaries.


Generated by Claude Code

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

and let $\trainset$ be a random [training set](#def-training-set).
At a covariate value $\predvar$,
with $\mean$ the [mean function](#def-mean-function),
with $\targetfn$ the [mean function](#def-mean-function),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

in this case we are talking about the mean function directly, so why not use \mean?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No good reason here: I swapped to \targetfn to match lds, but this chapter defines and discusses the mean function itself, where \mean fits. I reverted the model-validation changes. The PR is now only the latex-macros bump that makes the noise print ν, and \mean still prints μ.


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


Generated by Claude Code

@d-morrison d-morrison changed the title Write the true mean function with the targetfn macro Bump latex-macros so the noise prints as ν Oct 16, 2026
:::{#def-bias-variance-tradeoff}
#### Bias--variance trade-off

Let $\candproc{1}, \ldots, \candproc{\ncand}$ be [fitting procedures](#def-fitting-procedure),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

shouldn't the bias-variance trade-off be a trade-off between models rather than fitting procedures?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This PR no longer touches this file, so I'll handle it separately rather than here. Bias and variance in this chapter belong to a fitting procedure, because the prediction \fitproc(\predvar; \trainset) depends on the training set, and a model alone does not fix a prediction. So "among fitting procedures" follows the definitions the trade-off builds on. If you want it stated for models (the families the procedures fit), I'll open a follow-up PR that rewrites the definition and the linked ones consistently.


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


Generated by Claude Code

@d-morrison
d-morrison merged commit 86ea5c0 into main Oct 16, 2026
24 checks passed
@d-morrison
d-morrison deleted the claude/mu-true-mean-fn-fs0x15 branch October 16, 2026 23:37
@github-actions

Copy link
Copy Markdown
Contributor

Claude finished review — View run


Review of PR #259 (commit c173438)

The new commit c173438 ("Keep the mean macro for the mean function") has one blocking problem. It silently undoes the semantic line breaks that 55147f4 added. Everything else in it is fine.

The prior round was Ready for merge on 2026-10-16 at 55147f4. It does not carry over to this commit.

Changes since the last round: git log --oneline --no-merges 55147f41..c1734381 --not d26452d6 shows one commit, c173438. I read the full diff of 55147f41..c1734381.

What the commit does well

The macro swap is consistent. \targetfn becomes \mean and \targetfnf{\predvar} becomes \mean(\predvar) across all 11 files. latex-macros/macros.qmd:89 defines \def\mean{\mu}, so the rendered symbol is still \mu. The anchors #def-mean-function and #eq-mean-function are unchanged. No \targetfn is left under _subfiles/model-validation/.

Blocking: the semantic line breaks from 55147f4 are reverted

The commit collapses clause-boundary breaks back into long packed lines in three files. CLAUDE.md requires one sentence per line, with long sentences broken at clause boundaries, and says check-new-line-breaks.yml blocks a PR that adds a packed line. Because the packed lines come from this PR's diff, that check should fail.

  • _subfiles/model-validation/_def-bias-variance-tradeoff.qmd:~11: of the prediction, used as an [estimator](...) of $\mean(\predvar)$, does not rise is again one line. It was three lines at 55147f4.
  • _subfiles/model-validation/_sol-epe-split-noise.qmd:3: Write the prediction error as noise plus the error of the prediction, used as an [estimator](...) of the [mean function](#def-mean-function) value $\mean(\predvar)$: is one packed line.
  • _subfiles/model-validation/_sol-epe-split-noise.qmd:~77: Without the zero mean, independence alone would leave $2 \E{\noise}$ times $\E{\mean(\predvar) - \fitproc\paren{\predvar; \trainset}}$, which need not be zero. is packed.
  • _subfiles/model-validation/_thm-epe-decomposition.qmd:~26: By @sol-epe-split-noise, the expected squared prediction error is the noise variance plus the pMSE of the prediction, used as an [estimator](...) of $\mean(\predvar)$. is packed.

The likely cause is that the author reapplied the macro rename on top of a pre-55147f4 copy of these files, or resolved a conflict by taking the old side.

Fix: re-apply the line breaks from 55147f4 on these three files. Only the macro substitution should differ from that commit. Running git diff 55147f41 c1734381 -w --word-diff afterwards should show only \targetfn… → \mean… changes.

Non-blocking

The earlier observation still applies. \mean(...) is used elsewhere for the same concept, so this commit makes the model-validation pages consistent with those pages. If the PR's original aim was the \targetfn rename, its title and description should now say that the PR keeps \mean.

Verdict

Needs more work

@claude address review comments in [this review](https://github.com/Morrison-Lab/sds/pull/259)
Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "c1734381c84af3b00e6a2266e1df5b2267521eb7",
  "verdict": "NOT_CLEAN",
  "findings": [
    {
      "file": "_subfiles/model-validation/_sol-epe-split-noise.qmd",
      "line": 3,
      "category": "style",
      "message": "Commit c173438 reverts the semantic line breaks added in 55147f4, leaving packed multi-clause lines that check-new-line-breaks.yml blocks."
    },
    {
      "file": "_subfiles/model-validation/_thm-epe-decomposition.qmd",
      "line": 26,
      "category": "style",
      "message": "The proof sentence citing sol-epe-split-noise is a single packed line again, undoing the clause-boundary break from 55147f4."
    },
    {
      "file": "_subfiles/model-validation/_def-bias-variance-tradeoff.qmd",
      "line": 11,
      "category": "style",
      "message": "The clause 'of the prediction, used as an estimator of mean(predvar), does not rise' was re-joined into one packed line."
    }
  ],
  "detailed_assessment": "Commit c173438 swaps targetfn for the mean macro consistently, but in _sol-epe-split-noise.qmd, _thm-epe-decomposition.qmd and _def-bias-variance-tradeoff.qmd it also re-joins lines that 55147f4 had broken at clause boundaries, creating packed lines.",
  "holistic_assessment": "The macro change is rendering-neutral and keeps anchors stable, but undoing the prior line-break commit regresses a CLAUDE.md requirement enforced by CI, so the PR should restore the breaks before merging."
}

Reviewed commit: c173438

@github-actions

Copy link
Copy Markdown
Contributor

💰 Cost: $0.2221 (review) — run

@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
🚀 Preview available at: https://Morrison-Lab.github.io/sds/pr-preview/pr-259/

Built to branch gh-pages at 2026-10-16 23:50 UTC.

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