Skip to content

Add \condpopriskf for the conditional risk at an input - #342

Merged
d-morrison merged 2 commits into
mainfrom
claude/project-thread-gtfn72
Nov 6, 2026
Merged

d-morrison merged 2 commits into
mainfrom
claude/project-thread-gtfn72

Conversation

@d-morrison

Copy link
Copy Markdown
Collaborator

Requested by Ezra · project thread

What

Adds \condpopriskf{f}{x}, which prints R(f | x): the expected loss of a model given the input. Ezra chose on 2026-10-28 to distinguish it from the population risk \popriskf{f}, which is its average over the input.

Why

  • lds defines only the averaged risk, but its bias–variance theorem works with the pointwise quantity, unnamed.
  • Brian Hutchinson's Fall 2025 theory.pdf calls it the "conditional risk" and gives it no symbol.
  • Duda and Hart separate the conditional risk from the overall risk, and ESL writes EPE(x₀) beside EPE(f).

Changes

  • macros.qmd: \condpopriskf (two required arguments, no optional ones, per the lds parser).
  • interpretations.tsv: one row; no duplicate keys.
  • notation-choices.qmd: the decision and the other sources' conventions.
  • _tests/pdf-include-in-header.qmd: plain, squared, subscripted and tall-argument cases.

Checks

I compiled the test page with pdflatex and read the page image: the exponent rises over the closing parenthesis, including with \frac{a}{b} as the argument. I did not run it in MathJax separately.

Next: an lds PR that adds #def-conditional-risk after this merges and the pin is bumped.


Generated by Claude Code

The risk of a model at one input, R(f | x), is the expected loss given
the input; the population risk is its average over the input. Duda and
Hart, Hutchinson's theory notes and ESL all use the pointwise quantity,
and lds had no name or symbol for it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019xfc9o4dP1vKjn3ZbFhuJB
@d-morrison d-morrison self-assigned this Nov 6, 2026

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

/review


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


Generated by Claude Code

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

👀 Claude Review Dispatched — run reviewing PR #342 at 7d660aa.

@github-actions

github-actions Bot commented Nov 6, 2026 •

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

2026-11-06 04:29 UTC

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Claude finished review — View run


Verdict

No blocking findings in the diff content reviewed; overall PR status not independently verified by this session. The content review found nothing new: macros.qmd:186, interpretations.tsv:175, notation-choices.qmd:333-337, and _tests/pdf-include-in-header.qmd:42 are byte-identical to the content already reviewed in the prior round at commit 0d2bf104, no duplicate interpretations.tsv keys exist on the current head, and the only new commit (7d660aa) is a non-conflicting merge of main that added nothing to this PR's own diff.

I am not in a position to make a terminal merge-authorization call on this PR. The instrument that can authorize such a call, scripts/check-pr-fully-clean.py, is not available in this session, and this session's gh api access is denied, so I cannot run the paginated commits/<sha>/check-runs or commits/<sha>/status reads either. The only signal I obtained, gh pr checks, showed 2 of 6 checks still pending on the merge commit at the time I checked — a partial count, not a terminal determination.

Whoever advances this PR under the standing merge policy should run python3 scripts/check-pr-fully-clean.py 342 -R Morrison-Lab/macros (via a session with GraphQL access) and confirm exit 0 on head 7d660aaab59ad91cbb9540a0e789507cb73fe575 before merging. This review's scope is limited to the code content, which has no outstanding issues.

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "7d660aaab59ad91cbb9540a0e789507cb73fe575",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "Confirmed the merge commit 7d660aa introduced no changes to macros.qmd, interpretations.tsv, notation-choices.qmd or the pdf-include-in-header test versus the previously reviewed 0d2bf104, and re-ran the duplicate-key check with no collisions found.",
  "holistic_assessment": "Scope stayed limited to the single condpopriskf macro addition with no regression from merged-in upstream PRs, but overall PR status was not independently verified since check-pr-fully-clean.py and paginated check-run endpoints were unavailable in this sandbox."
}

Reviewed commit: 7d660aa

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

💰 Cost: $0.3878 (review) — run

@d-morrison
d-morrison merged commit 04117ee into main Nov 6, 2026
13 checks passed
@d-morrison
d-morrison deleted the claude/project-thread-gtfn72 branch November 6, 2026 04:29
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